{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "strange-cartoon",
   "metadata": {},
   "source": [
    "# TimeEval shared parameter optimization result analysis"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "elegant-fellow",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Automatically reload packages:\n",
    "%load_ext autoreload\n",
    "%autoreload 2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "directed-instruction",
   "metadata": {},
   "outputs": [],
   "source": [
    "# imports\n",
    "import json\n",
    "import warnings\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "import scipy as sp\n",
    "import plotly.offline as py\n",
    "import plotly.graph_objects as go\n",
    "import plotly.figure_factory as ff\n",
    "import plotly.express as px\n",
    "from plotly.subplots import make_subplots\n",
    "from pathlib import Path\n",
    "from timeeval import Datasets"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "synthetic-motivation",
   "metadata": {},
   "source": [
    "## Configuration\n",
    "\n",
    "Target parameters that were optimized in this run (per algorithm):"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "4d114231",
   "metadata": {},
   "outputs": [],
   "source": [
    "algo_param_mapping = {\n",
    "  \"FFT\": [\"context_window_size\"],\n",
    "  \"Subsequence LOF\": [\"n_neighbors\", \"leaf_size\"],\n",
    "  \"Spectral Residual (SR)\": [\"mag_window_size\", \"score_window_size\"],\n",
    "  \"LaserDBN\": [\"n_bins\"],\n",
    "  \"k-Means\": [\"n_clusters\"],\n",
    "  \"XGBoosting (RR)\": [\"n_estimators\", \"train_window_size\", \"n_trees\"],\n",
    "  \"Hybrid KNN\": [\"n_neighbors\", \"n_estimators\"],\n",
    "  \"Subsequence IF\": [\"n_trees\"],\n",
    "  \"DeepAnT\": [\"prediction_window_size\"],\n",
    "  \"Random Forest Regressor (RR)\": [\"train_window_size\", \"n_trees\"]\n",
    "}"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "surface-tanzania",
   "metadata": {},
   "source": [
    "Define data and results folder:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "textile-preview",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Available result directories:\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "[PosixPath('../timeeval_experiments/results/2021-09-30-torsk'),\n",
       " PosixPath('../timeeval_experiments/results/2021-09-27_shared-optim')]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "Selecting:\n",
      "Data path: /home/sebastian/Documents/Projects/akita/data/test-cases\n",
      "Result path: /home/sebastian/Documents/Projects/akita/timeeval/timeeval_experiments/results/2021-09-27_shared-optim\n"
     ]
    }
   ],
   "source": [
    "# constants and configuration\n",
    "data_path = Path(\"../../data\") / \"test-cases\"\n",
    "result_root_path = Path(\"../timeeval_experiments/results\")\n",
    "experiment_result_folder = \"2021-09-27_shared-optim\"\n",
    "\n",
    "# build paths\n",
    "result_paths = [d for d in result_root_path.iterdir() if d.is_dir()]\n",
    "print(\"Available result directories:\")\n",
    "display(result_paths)\n",
    "\n",
    "result_path = result_root_path / experiment_result_folder\n",
    "print(\"\\nSelecting:\")\n",
    "print(f\"Data path: {data_path.resolve()}\")\n",
    "print(f\"Result path: {result_path.resolve()}\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7a158ae1",
   "metadata": {},
   "source": [
    "Load results and dataset metadata:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "02af6424",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Reading results from /home/sebastian/Documents/Projects/akita/timeeval/timeeval_experiments/results/2021-09-27_shared-optim\n"
     ]
    }
   ],
   "source": [
    "def extract_hyper_params(param_names):\n",
    "    def extract(value):\n",
    "        params = json.loads(value)\n",
    "        result = \"\"\n",
    "        for name in param_names:\n",
    "            value = params[name]\n",
    "            result += f\"{name}={value},\"\n",
    "        return \"\".join(result.rsplit(\",\", 1))\n",
    "    return extract\n",
    "\n",
    "# load results\n",
    "print(f\"Reading results from {result_path.resolve()}\")\n",
    "df = pd.read_csv(result_path / \"results.csv\")\n",
    "\n",
    "# add dataset_name column\n",
    "df[\"dataset_name\"] = df[\"dataset\"].str.split(\".\").str[0]\n",
    "\n",
    "# add optim_params column\n",
    "df[\"optim_params\"] = \"\"\n",
    "for algo in algo_param_mapping:\n",
    "    df_algo = df.loc[df[\"algorithm\"] == algo]\n",
    "    df.loc[df_algo.index, \"optim_params\"] = df_algo[\"hyper_params\"].apply(extract_hyper_params(algo_param_mapping[algo]))\n",
    "\n",
    "# load dataset metadata\n",
    "dmgr = Datasets(data_path)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "72dfe34f",
   "metadata": {},
   "source": [
    "Define plotting functions:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "spiritual-emergency",
   "metadata": {},
   "outputs": [],
   "source": [
    "def load_scores_df(algorithm_name, dataset_id, optim_params, repetition=1):\n",
    "    params_id = df.loc[(df[\"algorithm\"] == algorithm_name) & (df[\"collection\"] == dataset_id[0]) & (df[\"dataset\"] == dataset_id[1]) & (df[\"optim_params\"] == optim_params), \"hyper_params_id\"].item()\n",
    "    path = (\n",
    "        result_path /\n",
    "        algorithm_name /\n",
    "        params_id /\n",
    "        dataset_id[0] /\n",
    "        dataset_id[1] /\n",
    "        str(repetition) /\n",
    "        \"anomaly_scores.ts\"\n",
    "    )\n",
    "    return pd.read_csv(path, header=None)\n",
    "\n",
    "def plot_scores(algorithm_name, dataset_name):\n",
    "    if isinstance(algorithm_name, tuple):\n",
    "        algorithms = [algorithm_name]\n",
    "    elif not isinstance(algorithm_name, list):\n",
    "        raise ValueError(\"Please supply a tuple (algorithm_name, optim_params) or a list thereof as first argument!\")\n",
    "    else:\n",
    "        algorithms = algorithm_name\n",
    "    # construct dataset ID\n",
    "    dataset_id = (\"GutenTAG\", f\"{dataset_name}.unsupervised\")\n",
    "\n",
    "    # load dataset details\n",
    "    df_dataset = dmgr.get_dataset_df(dataset_id)\n",
    "\n",
    "    # check if dataset is multivariate\n",
    "    dataset_dim = df.loc[df[\"dataset_name\"] == dataset_name, \"dataset_input_dimensionality\"].unique().item()\n",
    "    dataset_dim = dataset_dim.lower()\n",
    "    \n",
    "    auroc = {}\n",
    "    df_scores = pd.DataFrame(index=df_dataset.index)\n",
    "    skip_algos = []\n",
    "    for algo, optim_params in algorithms:\n",
    "        # get algorithm metric results\n",
    "        try:\n",
    "            auroc[(algo, optim_params)] = df.loc[\n",
    "                (df[\"algorithm\"] == algo) & (df[\"dataset_name\"] == dataset_name) & (df[\"optim_params\"] == optim_params),\n",
    "                \"ROC_AUC\"\n",
    "            ].item()\n",
    "        except ValueError:\n",
    "            warnings.warn(f\"No ROC_AUC score found! Probably {algo} with params {optim_params} was not executed on {dataset_name}.\")\n",
    "            auroc[(algo, optim_params)] = -1\n",
    "            skip_algos.append((algo, optim_params))\n",
    "            continue\n",
    "\n",
    "        # load scores\n",
    "        training_type = df.loc[df[\"algorithm\"] == algo, \"algo_training_type\"].values[0].lower().replace(\"_\", \"-\")\n",
    "        try:\n",
    "            df_scores[(algo, optim_params)] = load_scores_df(algo, (\"GutenTAG\", f\"{dataset_name}.{training_type}\"), optim_params).iloc[:, 0]\n",
    "        except (ValueError, FileNotFoundError):\n",
    "            warnings.warn(f\"No anomaly scores found! Probably {algo} was not executed on {dataset_name} with params {optim_params}.\")\n",
    "            df_scores[(algo, optim_params)] = np.nan\n",
    "            skip_algos.append((algo, optim_params))\n",
    "    algorithms = [a for a in algorithms if a not in skip_algos]\n",
    "\n",
    "    # Create plot\n",
    "    fig = make_subplots(2, 1)\n",
    "    if dataset_dim == \"multivariate\":\n",
    "        for i in range(1, df_dataset.shape[1]-1):\n",
    "            fig.add_trace(go.Scatter(x=df_dataset.index, y=df_dataset.iloc[:, i], name=f\"channel-{i}\"), 1, 1)\n",
    "    else:\n",
    "        fig.add_trace(go.Scatter(x=df_dataset.index, y=df_dataset.iloc[:, 1], name=\"timeseries\"), 1, 1)\n",
    "    fig.add_trace(go.Scatter(x=df_dataset.index, y=df_dataset[\"is_anomaly\"], name=\"label\"), 2, 1)\n",
    "    \n",
    "    for item in algorithms:\n",
    "        algo, optim_params = item\n",
    "        fig.add_trace(go.Scatter(x=df_scores.index, y=df_scores[item], name=f\"{algo}={auroc[item]:.4f} ({optim_params})\"), 2, 1)\n",
    "    fig.update_xaxes(matches=\"x\")\n",
    "    fig.update_layout(\n",
    "        title=f\"Results of {','.join(np.unique([a for a, _ in algorithms]))} on {dataset_name}\",\n",
    "        height=400\n",
    "    )\n",
    "    return py.iplot(fig)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "julian-produce",
   "metadata": {},
   "source": [
    "## Analyze TimeEval results"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "disturbed-impact",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>algorithm</th>\n",
       "      <th>dataset_name</th>\n",
       "      <th>status</th>\n",
       "      <th>AVERAGE_PRECISION</th>\n",
       "      <th>PR_AUC</th>\n",
       "      <th>RANGE_PR_AUC</th>\n",
       "      <th>ROC_AUC</th>\n",
       "      <th>execute_main_time</th>\n",
       "      <th>optim_params</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>DeepAnT</td>\n",
       "      <td>ecg-channels-all-of-3</td>\n",
       "      <td>Status.OK</td>\n",
       "      <td>0.005201</td>\n",
       "      <td>0.005145</td>\n",
       "      <td>0.485061</td>\n",
       "      <td>0.082442</td>\n",
       "      <td>10.334360</td>\n",
       "      <td>prediction_window_size=1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>DeepAnT</td>\n",
       "      <td>ecg-channels-single-of-10</td>\n",
       "      <td>Status.OK</td>\n",
       "      <td>0.006335</td>\n",
       "      <td>0.006263</td>\n",
       "      <td>0.237304</td>\n",
       "      <td>0.256400</td>\n",
       "      <td>10.481046</td>\n",
       "      <td>prediction_window_size=1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>DeepAnT</td>\n",
       "      <td>ecg-channels-single-of-2</td>\n",
       "      <td>Status.OK</td>\n",
       "      <td>0.005987</td>\n",
       "      <td>0.005920</td>\n",
       "      <td>0.213420</td>\n",
       "      <td>0.213586</td>\n",
       "      <td>10.229906</td>\n",
       "      <td>prediction_window_size=1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>DeepAnT</td>\n",
       "      <td>ecg-channels-single-of-20</td>\n",
       "      <td>Status.OK</td>\n",
       "      <td>0.006699</td>\n",
       "      <td>0.006619</td>\n",
       "      <td>0.247859</td>\n",
       "      <td>0.303753</td>\n",
       "      <td>10.746507</td>\n",
       "      <td>prediction_window_size=1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>DeepAnT</td>\n",
       "      <td>ecg-channels-single-of-5</td>\n",
       "      <td>Status.OK</td>\n",
       "      <td>0.006205</td>\n",
       "      <td>0.006135</td>\n",
       "      <td>0.276975</td>\n",
       "      <td>0.237219</td>\n",
       "      <td>10.280138</td>\n",
       "      <td>prediction_window_size=1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29860</th>\n",
       "      <td>Subsequence LOF</td>\n",
       "      <td>sinus-type-pattern-shift</td>\n",
       "      <td>Status.OK</td>\n",
       "      <td>0.659779</td>\n",
       "      <td>0.657385</td>\n",
       "      <td>0.637168</td>\n",
       "      <td>0.986935</td>\n",
       "      <td>11.559971</td>\n",
       "      <td>n_neighbors=50,leaf_size=40</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29861</th>\n",
       "      <td>Subsequence LOF</td>\n",
       "      <td>sinus-type-pattern</td>\n",
       "      <td>Status.OK</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>0.995035</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>11.696036</td>\n",
       "      <td>n_neighbors=50,leaf_size=40</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29862</th>\n",
       "      <td>Subsequence LOF</td>\n",
       "      <td>sinus-type-platform</td>\n",
       "      <td>Status.OK</td>\n",
       "      <td>0.347330</td>\n",
       "      <td>0.339532</td>\n",
       "      <td>0.337769</td>\n",
       "      <td>0.816412</td>\n",
       "      <td>13.332605</td>\n",
       "      <td>n_neighbors=50,leaf_size=40</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29863</th>\n",
       "      <td>Subsequence LOF</td>\n",
       "      <td>sinus-type-trend</td>\n",
       "      <td>Status.OK</td>\n",
       "      <td>0.996865</td>\n",
       "      <td>0.996852</td>\n",
       "      <td>0.985046</td>\n",
       "      <td>0.999963</td>\n",
       "      <td>15.411443</td>\n",
       "      <td>n_neighbors=50,leaf_size=40</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29864</th>\n",
       "      <td>Subsequence LOF</td>\n",
       "      <td>sinus-type-variance</td>\n",
       "      <td>Status.OK</td>\n",
       "      <td>0.998533</td>\n",
       "      <td>0.998526</td>\n",
       "      <td>0.993799</td>\n",
       "      <td>0.999985</td>\n",
       "      <td>17.307776</td>\n",
       "      <td>n_neighbors=50,leaf_size=40</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>29865 rows × 9 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "             algorithm               dataset_name     status  \\\n",
       "0              DeepAnT      ecg-channels-all-of-3  Status.OK   \n",
       "1              DeepAnT  ecg-channels-single-of-10  Status.OK   \n",
       "2              DeepAnT   ecg-channels-single-of-2  Status.OK   \n",
       "3              DeepAnT  ecg-channels-single-of-20  Status.OK   \n",
       "4              DeepAnT   ecg-channels-single-of-5  Status.OK   \n",
       "...                ...                        ...        ...   \n",
       "29860  Subsequence LOF   sinus-type-pattern-shift  Status.OK   \n",
       "29861  Subsequence LOF         sinus-type-pattern  Status.OK   \n",
       "29862  Subsequence LOF        sinus-type-platform  Status.OK   \n",
       "29863  Subsequence LOF           sinus-type-trend  Status.OK   \n",
       "29864  Subsequence LOF        sinus-type-variance  Status.OK   \n",
       "\n",
       "       AVERAGE_PRECISION    PR_AUC  RANGE_PR_AUC   ROC_AUC  execute_main_time  \\\n",
       "0               0.005201  0.005145      0.485061  0.082442          10.334360   \n",
       "1               0.006335  0.006263      0.237304  0.256400          10.481046   \n",
       "2               0.005987  0.005920      0.213420  0.213586          10.229906   \n",
       "3               0.006699  0.006619      0.247859  0.303753          10.746507   \n",
       "4               0.006205  0.006135      0.276975  0.237219          10.280138   \n",
       "...                  ...       ...           ...       ...                ...   \n",
       "29860           0.659779  0.657385      0.637168  0.986935          11.559971   \n",
       "29861           1.000000  1.000000      0.995035  1.000000          11.696036   \n",
       "29862           0.347330  0.339532      0.337769  0.816412          13.332605   \n",
       "29863           0.996865  0.996852      0.985046  0.999963          15.411443   \n",
       "29864           0.998533  0.998526      0.993799  0.999985          17.307776   \n",
       "\n",
       "                      optim_params  \n",
       "0         prediction_window_size=1  \n",
       "1         prediction_window_size=1  \n",
       "2         prediction_window_size=1  \n",
       "3         prediction_window_size=1  \n",
       "4         prediction_window_size=1  \n",
       "...                            ...  \n",
       "29860  n_neighbors=50,leaf_size=40  \n",
       "29861  n_neighbors=50,leaf_size=40  \n",
       "29862  n_neighbors=50,leaf_size=40  \n",
       "29863  n_neighbors=50,leaf_size=40  \n",
       "29864  n_neighbors=50,leaf_size=40  \n",
       "\n",
       "[29865 rows x 9 columns]"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[[\"algorithm\", \"dataset_name\", \"status\", \"AVERAGE_PRECISION\", \"PR_AUC\", \"RANGE_PR_AUC\", \"ROC_AUC\", \"execute_main_time\", \"optim_params\"]]"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "casual-rubber",
   "metadata": {},
   "source": [
    "---\n",
    "\n",
    "### Errors"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "incident-clarity",
   "metadata": {
    "scrolled": false
   },
   "outputs": [],
   "source": [
    "df_error_counts = df.pivot_table(index=[\"algo_training_type\", \"algorithm\"], columns=[\"status\"], values=\"repetition\", aggfunc=\"count\")\n",
    "df_error_counts = df_error_counts.fillna(value=0).astype(np.int64)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "signed-recycling",
   "metadata": {},
   "source": [
    "#### Aggregation of errors per algorithm grouped by algorithm training type"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "sharing-lewis",
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "SEMI_SUPERVISED\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th>status</th>\n",
       "      <th>Status.ERROR</th>\n",
       "      <th>Status.OK</th>\n",
       "      <th>Status.TIMEOUT</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>algorithm</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>DeepAnT</th>\n",
       "      <td>134</td>\n",
       "      <td>2346</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Hybrid KNN</th>\n",
       "      <td>765</td>\n",
       "      <td>2025</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>LaserDBN</th>\n",
       "      <td>35</td>\n",
       "      <td>422</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Random Forest Regressor (RR)</th>\n",
       "      <td>0</td>\n",
       "      <td>1620</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>XGBoosting (RR)</th>\n",
       "      <td>0</td>\n",
       "      <td>2552</td>\n",
       "      <td>2308</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "status                        Status.ERROR  Status.OK  Status.TIMEOUT\n",
       "algorithm                                                            \n",
       "DeepAnT                                134       2346               0\n",
       "Hybrid KNN                             765       2025               0\n",
       "LaserDBN                                35        422               8\n",
       "Random Forest Regressor (RR)             0       1620               0\n",
       "XGBoosting (RR)                          0       2552            2308"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "UNSUPERVISED\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th>status</th>\n",
       "      <th>Status.ERROR</th>\n",
       "      <th>Status.OK</th>\n",
       "      <th>Status.TIMEOUT</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>algorithm</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>FFT</th>\n",
       "      <td>0</td>\n",
       "      <td>675</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Spectral Residual (SR)</th>\n",
       "      <td>0</td>\n",
       "      <td>4860</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Subsequence IF</th>\n",
       "      <td>0</td>\n",
       "      <td>1620</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Subsequence LOF</th>\n",
       "      <td>0</td>\n",
       "      <td>9720</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>k-Means</th>\n",
       "      <td>0</td>\n",
       "      <td>775</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "status                  Status.ERROR  Status.OK  Status.TIMEOUT\n",
       "algorithm                                                      \n",
       "FFT                                0        675               0\n",
       "Spectral Residual (SR)             0       4860               0\n",
       "Subsequence IF                     0       1620               0\n",
       "Subsequence LOF                    0       9720               0\n",
       "k-Means                            0        775               0"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "for tpe in [\"SEMI_SUPERVISED\", \"SUPERVISED\", \"UNSUPERVISED\"]:\n",
    "    if tpe in df_error_counts.index:\n",
    "        print(tpe)\n",
    "        display(df_error_counts.loc[tpe])"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "quantitative-wednesday",
   "metadata": {},
   "source": [
    "#### Slow algorithms\n",
    "\n",
    "Algorithms, for which more than 50% of all executions ran into the timeout."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "bigger-africa",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>status</th>\n",
       "      <th>Status.ERROR</th>\n",
       "      <th>Status.OK</th>\n",
       "      <th>Status.TIMEOUT</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>algo_training_type</th>\n",
       "      <th>algorithm</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "Empty DataFrame\n",
       "Columns: [Status.ERROR, Status.OK, Status.TIMEOUT]\n",
       "Index: []"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_error_counts[df_error_counts[\"Status.TIMEOUT\"] > (df_error_counts[\"Status.ERROR\"] + df_error_counts[\"Status.OK\"])]"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "shaped-outside",
   "metadata": {},
   "source": [
    "#### Broken algorithms\n",
    "\n",
    "Algorithms, which failed for at least 50% of the executions."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "optical-elder",
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>status</th>\n",
       "      <th>Status.ERROR</th>\n",
       "      <th>Status.OK</th>\n",
       "      <th>Status.TIMEOUT</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>algo_training_type</th>\n",
       "      <th>algorithm</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "Empty DataFrame\n",
       "Columns: [Status.ERROR, Status.OK, Status.TIMEOUT]\n",
       "Index: []"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "error_threshold = 0.5\n",
    "df_error_counts[df_error_counts[\"Status.ERROR\"] > error_threshold*(\n",
    "    df_error_counts[\"Status.TIMEOUT\"] + df_error_counts[\"Status.ERROR\"] + df_error_counts[\"Status.OK\"]\n",
    ")]"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "97010441",
   "metadata": {},
   "source": [
    "#### Detail errors"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "68b1af05",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>OOM</th>\n",
       "      <th>Segfault</th>\n",
       "      <th>ZeroDivisionError</th>\n",
       "      <th>IncompatibleParameterConfig</th>\n",
       "      <th>WrongDBNState</th>\n",
       "      <th>other</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>DeepAnT</th>\n",
       "      <td>94</td>\n",
       "      <td>0</td>\n",
       "      <td>40</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Hybrid KNN</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>765</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>LaserDBN</th>\n",
       "      <td>0</td>\n",
       "      <td>20</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>15</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            OOM  Segfault  ZeroDivisionError  IncompatibleParameterConfig  \\\n",
       "DeepAnT      94         0                 40                            0   \n",
       "Hybrid KNN    0         0                  0                          765   \n",
       "LaserDBN      0        20                  0                            0   \n",
       "\n",
       "            WrongDBNState  other  \n",
       "DeepAnT                 0      0  \n",
       "Hybrid KNN              0      0  \n",
       "LaserDBN               15      0  "
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "algo_list = [\"DeepAnT\", \"Hybrid KNN\", \"LaserDBN\"]\n",
    "\n",
    "error_list = [\"OOM\", \"Segfault\", \"ZeroDivisionError\", \"IncompatibleParameterConfig\", \"WrongDBNState\", \"other\"]\n",
    "errors = pd.DataFrame(0, index=error_list, columns=algo_list, dtype=np.int_)\n",
    "for algo in algo_list:\n",
    "    df_tmp = df[(df[\"algorithm\"] == algo) & (df[\"status\"] == \"Status.ERROR\")]\n",
    "    for i, run in df_tmp.iterrows():\n",
    "        path = result_path / run[\"algorithm\"] / run[\"hyper_params_id\"] / run[\"collection\"] / run[\"dataset\"] / str(run[\"repetition\"]) / \"execution.log\"\n",
    "        with path.open(\"r\") as fh:\n",
    "            log = fh.read()\n",
    "            if \"status code '139'\" in log:\n",
    "                errors.loc[\"Segfault\", algo] += 1\n",
    "            elif \"status code '137'\" in log:\n",
    "                errors.loc[\"OOM\", algo] += 1\n",
    "            elif \"Expected n_neighbors <= n_samples\" in log:\n",
    "                errors.loc[\"IncompatibleParameterConfig\", algo] += 1\n",
    "            elif \"ZeroDivisionError\" in log:\n",
    "                errors.loc[\"ZeroDivisionError\", algo] += 1\n",
    "            elif \"does not have key\" in log:\n",
    "                errors.loc[\"WrongDBNState\", algo] += 1\n",
    "            else:\n",
    "                print(f'\\n\\n#### {run[\"dataset\"]} ({run[\"optim_params\"]})')\n",
    "                print(log)\n",
    "                errors.loc[\"other\", algo] += 1\n",
    "errors.T"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "educated-observer",
   "metadata": {},
   "source": [
    "---\n",
    "\n",
    "### Parameter assessment"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "32ebedf7",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr:last-of-type th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th colspan=\"2\" halign=\"left\">AVERAGE_PRECISION</th>\n",
       "      <th colspan=\"2\" halign=\"left\">RANGE_PR_AUC</th>\n",
       "      <th colspan=\"2\" halign=\"left\">PR_AUC</th>\n",
       "      <th colspan=\"2\" halign=\"left\">ROC_AUC</th>\n",
       "      <th>train_main_time</th>\n",
       "      <th>execute_main_time</th>\n",
       "      <th>repetition</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>mean</th>\n",
       "      <th>median</th>\n",
       "      <th>mean</th>\n",
       "      <th>median</th>\n",
       "      <th>mean</th>\n",
       "      <th>median</th>\n",
       "      <th>mean</th>\n",
       "      <th>median</th>\n",
       "      <th>mean</th>\n",
       "      <th>mean</th>\n",
       "      <th>count</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>algorithm</th>\n",
       "      <th>optim_params</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"5\" valign=\"top\">k-Means</th>\n",
       "      <th>n_clusters=50</th>\n",
       "      <td>0.731988</td>\n",
       "      <td>0.907493</td>\n",
       "      <td>0.734732</td>\n",
       "      <td>0.900248</td>\n",
       "      <td>0.731249</td>\n",
       "      <td>0.907353</td>\n",
       "      <td>0.906015</td>\n",
       "      <td>0.998755</td>\n",
       "      <td>NaN</td>\n",
       "      <td>110.274954</td>\n",
       "      <td>155</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_clusters=10</th>\n",
       "      <td>0.633051</td>\n",
       "      <td>0.813983</td>\n",
       "      <td>0.574486</td>\n",
       "      <td>0.595478</td>\n",
       "      <td>0.631465</td>\n",
       "      <td>0.813824</td>\n",
       "      <td>0.900291</td>\n",
       "      <td>0.995966</td>\n",
       "      <td>NaN</td>\n",
       "      <td>22.872482</td>\n",
       "      <td>155</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_clusters=40</th>\n",
       "      <td>0.735390</td>\n",
       "      <td>0.909753</td>\n",
       "      <td>0.731646</td>\n",
       "      <td>0.904161</td>\n",
       "      <td>0.734723</td>\n",
       "      <td>0.909307</td>\n",
       "      <td>0.897863</td>\n",
       "      <td>0.998609</td>\n",
       "      <td>NaN</td>\n",
       "      <td>91.804415</td>\n",
       "      <td>155</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_clusters=30</th>\n",
       "      <td>0.717902</td>\n",
       "      <td>0.901508</td>\n",
       "      <td>0.710469</td>\n",
       "      <td>0.859732</td>\n",
       "      <td>0.717282</td>\n",
       "      <td>0.900608</td>\n",
       "      <td>0.888424</td>\n",
       "      <td>0.998733</td>\n",
       "      <td>NaN</td>\n",
       "      <td>56.707882</td>\n",
       "      <td>155</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_clusters=5</th>\n",
       "      <td>0.508202</td>\n",
       "      <td>0.504451</td>\n",
       "      <td>0.475376</td>\n",
       "      <td>0.458131</td>\n",
       "      <td>0.506727</td>\n",
       "      <td>0.499666</td>\n",
       "      <td>0.799891</td>\n",
       "      <td>0.969181</td>\n",
       "      <td>NaN</td>\n",
       "      <td>15.024977</td>\n",
       "      <td>155</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"36\" valign=\"top\">XGBoosting (RR)</th>\n",
       "      <th>n_estimators=100,train_window_size=500,n_trees=10</th>\n",
       "      <td>0.577270</td>\n",
       "      <td>0.604820</td>\n",
       "      <td>0.540322</td>\n",
       "      <td>0.555543</td>\n",
       "      <td>0.576173</td>\n",
       "      <td>0.604537</td>\n",
       "      <td>0.875130</td>\n",
       "      <td>0.895263</td>\n",
       "      <td>759.508304</td>\n",
       "      <td>6.007331</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_estimators=1000,train_window_size=500,n_trees=10</th>\n",
       "      <td>0.595681</td>\n",
       "      <td>0.640770</td>\n",
       "      <td>0.560162</td>\n",
       "      <td>0.605990</td>\n",
       "      <td>0.594768</td>\n",
       "      <td>0.640666</td>\n",
       "      <td>0.875129</td>\n",
       "      <td>0.893394</td>\n",
       "      <td>6321.226583</td>\n",
       "      <td>7.495866</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_estimators=100,train_window_size=1000,n_trees=10</th>\n",
       "      <td>0.575332</td>\n",
       "      <td>0.605053</td>\n",
       "      <td>0.540936</td>\n",
       "      <td>0.566939</td>\n",
       "      <td>0.574269</td>\n",
       "      <td>0.594922</td>\n",
       "      <td>0.864566</td>\n",
       "      <td>0.886992</td>\n",
       "      <td>1464.654062</td>\n",
       "      <td>6.364846</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_estimators=1000,train_window_size=100,n_trees=10</th>\n",
       "      <td>0.543180</td>\n",
       "      <td>0.566363</td>\n",
       "      <td>0.506579</td>\n",
       "      <td>0.500050</td>\n",
       "      <td>0.541525</td>\n",
       "      <td>0.563024</td>\n",
       "      <td>0.863497</td>\n",
       "      <td>0.878400</td>\n",
       "      <td>1573.372765</td>\n",
       "      <td>9.030304</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_estimators=100,train_window_size=100,n_trees=10</th>\n",
       "      <td>0.539758</td>\n",
       "      <td>0.548155</td>\n",
       "      <td>0.503763</td>\n",
       "      <td>0.500050</td>\n",
       "      <td>0.538047</td>\n",
       "      <td>0.547702</td>\n",
       "      <td>0.858239</td>\n",
       "      <td>0.879929</td>\n",
       "      <td>169.182106</td>\n",
       "      <td>6.132443</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_estimators=100,train_window_size=50,n_trees=1000</th>\n",
       "      <td>0.580512</td>\n",
       "      <td>0.642343</td>\n",
       "      <td>0.533282</td>\n",
       "      <td>0.510869</td>\n",
       "      <td>0.579511</td>\n",
       "      <td>0.641934</td>\n",
       "      <td>0.857872</td>\n",
       "      <td>0.853390</td>\n",
       "      <td>6592.027692</td>\n",
       "      <td>30.459804</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_estimators=100,train_window_size=100,n_trees=100</th>\n",
       "      <td>0.539697</td>\n",
       "      <td>0.550340</td>\n",
       "      <td>0.503908</td>\n",
       "      <td>0.500050</td>\n",
       "      <td>0.537965</td>\n",
       "      <td>0.549889</td>\n",
       "      <td>0.857850</td>\n",
       "      <td>0.877791</td>\n",
       "      <td>1632.339777</td>\n",
       "      <td>9.164321</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_estimators=1000,train_window_size=50,n_trees=100</th>\n",
       "      <td>0.577064</td>\n",
       "      <td>0.596543</td>\n",
       "      <td>0.472797</td>\n",
       "      <td>0.500050</td>\n",
       "      <td>0.573416</td>\n",
       "      <td>0.570399</td>\n",
       "      <td>0.850897</td>\n",
       "      <td>0.871132</td>\n",
       "      <td>5952.980637</td>\n",
       "      <td>27.112379</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_estimators=100,train_window_size=500,n_trees=100</th>\n",
       "      <td>0.566974</td>\n",
       "      <td>0.636175</td>\n",
       "      <td>0.488478</td>\n",
       "      <td>0.500050</td>\n",
       "      <td>0.566107</td>\n",
       "      <td>0.635567</td>\n",
       "      <td>0.839347</td>\n",
       "      <td>0.894931</td>\n",
       "      <td>6279.308873</td>\n",
       "      <td>6.914177</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_estimators=1000,train_window_size=50,n_trees=10</th>\n",
       "      <td>0.537368</td>\n",
       "      <td>0.574096</td>\n",
       "      <td>0.496935</td>\n",
       "      <td>0.500050</td>\n",
       "      <td>0.535273</td>\n",
       "      <td>0.573212</td>\n",
       "      <td>0.836716</td>\n",
       "      <td>0.866733</td>\n",
       "      <td>789.579509</td>\n",
       "      <td>8.693578</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_estimators=100,train_window_size=50,n_trees=100</th>\n",
       "      <td>0.529155</td>\n",
       "      <td>0.556053</td>\n",
       "      <td>0.489409</td>\n",
       "      <td>0.500050</td>\n",
       "      <td>0.526898</td>\n",
       "      <td>0.552242</td>\n",
       "      <td>0.830433</td>\n",
       "      <td>0.866575</td>\n",
       "      <td>823.751375</td>\n",
       "      <td>8.768884</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_estimators=100,train_window_size=50,n_trees=10</th>\n",
       "      <td>0.529162</td>\n",
       "      <td>0.560240</td>\n",
       "      <td>0.489739</td>\n",
       "      <td>0.500050</td>\n",
       "      <td>0.526967</td>\n",
       "      <td>0.549307</td>\n",
       "      <td>0.829750</td>\n",
       "      <td>0.861499</td>\n",
       "      <td>89.030824</td>\n",
       "      <td>6.234096</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_estimators=10,train_window_size=500,n_trees=1000</th>\n",
       "      <td>0.229250</td>\n",
       "      <td>0.143352</td>\n",
       "      <td>0.290242</td>\n",
       "      <td>0.261557</td>\n",
       "      <td>0.228494</td>\n",
       "      <td>0.142710</td>\n",
       "      <td>0.673216</td>\n",
       "      <td>0.620912</td>\n",
       "      <td>6272.249137</td>\n",
       "      <td>6.856892</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_estimators=10,train_window_size=1000,n_trees=100</th>\n",
       "      <td>0.179102</td>\n",
       "      <td>0.093609</td>\n",
       "      <td>0.279673</td>\n",
       "      <td>0.218113</td>\n",
       "      <td>0.176832</td>\n",
       "      <td>0.089764</td>\n",
       "      <td>0.617297</td>\n",
       "      <td>0.610721</td>\n",
       "      <td>1451.360779</td>\n",
       "      <td>6.411457</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_estimators=10,train_window_size=1000,n_trees=10</th>\n",
       "      <td>0.179040</td>\n",
       "      <td>0.093609</td>\n",
       "      <td>0.279196</td>\n",
       "      <td>0.218114</td>\n",
       "      <td>0.176764</td>\n",
       "      <td>0.089833</td>\n",
       "      <td>0.617170</td>\n",
       "      <td>0.610704</td>\n",
       "      <td>153.756991</td>\n",
       "      <td>5.987072</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_estimators=10,train_window_size=500,n_trees=100</th>\n",
       "      <td>0.174391</td>\n",
       "      <td>0.087336</td>\n",
       "      <td>0.275026</td>\n",
       "      <td>0.220039</td>\n",
       "      <td>0.172440</td>\n",
       "      <td>0.081960</td>\n",
       "      <td>0.601369</td>\n",
       "      <td>0.593624</td>\n",
       "      <td>765.019769</td>\n",
       "      <td>6.105588</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_estimators=10,train_window_size=500,n_trees=10</th>\n",
       "      <td>0.174494</td>\n",
       "      <td>0.087336</td>\n",
       "      <td>0.275069</td>\n",
       "      <td>0.220039</td>\n",
       "      <td>0.172486</td>\n",
       "      <td>0.081960</td>\n",
       "      <td>0.601317</td>\n",
       "      <td>0.593625</td>\n",
       "      <td>82.872935</td>\n",
       "      <td>5.698693</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_estimators=10,train_window_size=100,n_trees=1000</th>\n",
       "      <td>0.174394</td>\n",
       "      <td>0.090088</td>\n",
       "      <td>0.273129</td>\n",
       "      <td>0.222843</td>\n",
       "      <td>0.173366</td>\n",
       "      <td>0.089787</td>\n",
       "      <td>0.582695</td>\n",
       "      <td>0.572823</td>\n",
       "      <td>1615.638221</td>\n",
       "      <td>8.856995</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_estimators=10,train_window_size=100,n_trees=100</th>\n",
       "      <td>0.174482</td>\n",
       "      <td>0.093290</td>\n",
       "      <td>0.272927</td>\n",
       "      <td>0.222832</td>\n",
       "      <td>0.173455</td>\n",
       "      <td>0.093059</td>\n",
       "      <td>0.582505</td>\n",
       "      <td>0.568211</td>\n",
       "      <td>167.877371</td>\n",
       "      <td>6.022906</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_estimators=10,train_window_size=100,n_trees=10</th>\n",
       "      <td>0.174541</td>\n",
       "      <td>0.093254</td>\n",
       "      <td>0.273224</td>\n",
       "      <td>0.222829</td>\n",
       "      <td>0.173514</td>\n",
       "      <td>0.093024</td>\n",
       "      <td>0.582463</td>\n",
       "      <td>0.568211</td>\n",
       "      <td>21.867478</td>\n",
       "      <td>5.839729</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_estimators=10,train_window_size=50,n_trees=10</th>\n",
       "      <td>0.170264</td>\n",
       "      <td>0.079827</td>\n",
       "      <td>0.271350</td>\n",
       "      <td>0.204957</td>\n",
       "      <td>0.167371</td>\n",
       "      <td>0.078624</td>\n",
       "      <td>0.576051</td>\n",
       "      <td>0.560544</td>\n",
       "      <td>14.024271</td>\n",
       "      <td>5.856473</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_estimators=10,train_window_size=50,n_trees=1000</th>\n",
       "      <td>0.170302</td>\n",
       "      <td>0.079827</td>\n",
       "      <td>0.271191</td>\n",
       "      <td>0.205015</td>\n",
       "      <td>0.167410</td>\n",
       "      <td>0.078624</td>\n",
       "      <td>0.575939</td>\n",
       "      <td>0.560551</td>\n",
       "      <td>809.931573</td>\n",
       "      <td>8.679434</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_estimators=10,train_window_size=50,n_trees=100</th>\n",
       "      <td>0.170352</td>\n",
       "      <td>0.079827</td>\n",
       "      <td>0.271405</td>\n",
       "      <td>0.204956</td>\n",
       "      <td>0.167461</td>\n",
       "      <td>0.078624</td>\n",
       "      <td>0.575928</td>\n",
       "      <td>0.560543</td>\n",
       "      <td>86.318694</td>\n",
       "      <td>5.868259</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_estimators=10,train_window_size=1000,n_trees=1000</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_estimators=100,train_window_size=100,n_trees=1000</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_estimators=100,train_window_size=1000,n_trees=100</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_estimators=100,train_window_size=1000,n_trees=1000</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_estimators=100,train_window_size=500,n_trees=1000</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_estimators=1000,train_window_size=100,n_trees=100</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_estimators=1000,train_window_size=100,n_trees=1000</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_estimators=1000,train_window_size=1000,n_trees=10</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_estimators=1000,train_window_size=1000,n_trees=100</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_estimators=1000,train_window_size=1000,n_trees=1000</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_estimators=1000,train_window_size=50,n_trees=1000</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_estimators=1000,train_window_size=500,n_trees=100</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_estimators=1000,train_window_size=500,n_trees=1000</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"18\" valign=\"top\">Subsequence LOF</th>\n",
       "      <th>n_neighbors=50,leaf_size=20</th>\n",
       "      <td>0.745121</td>\n",
       "      <td>0.882197</td>\n",
       "      <td>0.707190</td>\n",
       "      <td>0.775156</td>\n",
       "      <td>0.743959</td>\n",
       "      <td>0.882092</td>\n",
       "      <td>0.952246</td>\n",
       "      <td>0.997405</td>\n",
       "      <td>NaN</td>\n",
       "      <td>17.370683</td>\n",
       "      <td>540</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_neighbors=50,leaf_size=30</th>\n",
       "      <td>0.745121</td>\n",
       "      <td>0.882197</td>\n",
       "      <td>0.707190</td>\n",
       "      <td>0.775156</td>\n",
       "      <td>0.743959</td>\n",
       "      <td>0.882092</td>\n",
       "      <td>0.952246</td>\n",
       "      <td>0.997405</td>\n",
       "      <td>NaN</td>\n",
       "      <td>17.489975</td>\n",
       "      <td>540</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_neighbors=50,leaf_size=40</th>\n",
       "      <td>0.745121</td>\n",
       "      <td>0.882197</td>\n",
       "      <td>0.707190</td>\n",
       "      <td>0.775156</td>\n",
       "      <td>0.743959</td>\n",
       "      <td>0.882092</td>\n",
       "      <td>0.952246</td>\n",
       "      <td>0.997405</td>\n",
       "      <td>NaN</td>\n",
       "      <td>17.376043</td>\n",
       "      <td>540</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_neighbors=40,leaf_size=20</th>\n",
       "      <td>0.738201</td>\n",
       "      <td>0.873758</td>\n",
       "      <td>0.699009</td>\n",
       "      <td>0.776050</td>\n",
       "      <td>0.737149</td>\n",
       "      <td>0.873213</td>\n",
       "      <td>0.947352</td>\n",
       "      <td>0.996979</td>\n",
       "      <td>NaN</td>\n",
       "      <td>17.605290</td>\n",
       "      <td>540</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_neighbors=40,leaf_size=30</th>\n",
       "      <td>0.738201</td>\n",
       "      <td>0.873758</td>\n",
       "      <td>0.699009</td>\n",
       "      <td>0.776050</td>\n",
       "      <td>0.737149</td>\n",
       "      <td>0.873213</td>\n",
       "      <td>0.947352</td>\n",
       "      <td>0.996979</td>\n",
       "      <td>NaN</td>\n",
       "      <td>17.293120</td>\n",
       "      <td>540</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_neighbors=40,leaf_size=40</th>\n",
       "      <td>0.738201</td>\n",
       "      <td>0.873758</td>\n",
       "      <td>0.699009</td>\n",
       "      <td>0.776050</td>\n",
       "      <td>0.737149</td>\n",
       "      <td>0.873213</td>\n",
       "      <td>0.947352</td>\n",
       "      <td>0.996979</td>\n",
       "      <td>NaN</td>\n",
       "      <td>17.339382</td>\n",
       "      <td>540</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_neighbors=30,leaf_size=20</th>\n",
       "      <td>0.721686</td>\n",
       "      <td>0.871042</td>\n",
       "      <td>0.682854</td>\n",
       "      <td>0.755797</td>\n",
       "      <td>0.720621</td>\n",
       "      <td>0.870822</td>\n",
       "      <td>0.937379</td>\n",
       "      <td>0.996399</td>\n",
       "      <td>NaN</td>\n",
       "      <td>17.448414</td>\n",
       "      <td>540</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_neighbors=30,leaf_size=30</th>\n",
       "      <td>0.721686</td>\n",
       "      <td>0.871042</td>\n",
       "      <td>0.682854</td>\n",
       "      <td>0.755797</td>\n",
       "      <td>0.720621</td>\n",
       "      <td>0.870822</td>\n",
       "      <td>0.937379</td>\n",
       "      <td>0.996399</td>\n",
       "      <td>NaN</td>\n",
       "      <td>17.350395</td>\n",
       "      <td>540</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_neighbors=30,leaf_size=40</th>\n",
       "      <td>0.721686</td>\n",
       "      <td>0.871042</td>\n",
       "      <td>0.682854</td>\n",
       "      <td>0.755797</td>\n",
       "      <td>0.720621</td>\n",
       "      <td>0.870822</td>\n",
       "      <td>0.937379</td>\n",
       "      <td>0.996399</td>\n",
       "      <td>NaN</td>\n",
       "      <td>17.279908</td>\n",
       "      <td>540</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_neighbors=20,leaf_size=20</th>\n",
       "      <td>0.702056</td>\n",
       "      <td>0.839087</td>\n",
       "      <td>0.661447</td>\n",
       "      <td>0.731093</td>\n",
       "      <td>0.700981</td>\n",
       "      <td>0.838854</td>\n",
       "      <td>0.922816</td>\n",
       "      <td>0.995913</td>\n",
       "      <td>NaN</td>\n",
       "      <td>17.454309</td>\n",
       "      <td>540</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_neighbors=20,leaf_size=30</th>\n",
       "      <td>0.702056</td>\n",
       "      <td>0.839087</td>\n",
       "      <td>0.661447</td>\n",
       "      <td>0.731093</td>\n",
       "      <td>0.700981</td>\n",
       "      <td>0.838854</td>\n",
       "      <td>0.922816</td>\n",
       "      <td>0.995913</td>\n",
       "      <td>NaN</td>\n",
       "      <td>17.489518</td>\n",
       "      <td>540</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_neighbors=20,leaf_size=40</th>\n",
       "      <td>0.702056</td>\n",
       "      <td>0.839087</td>\n",
       "      <td>0.661447</td>\n",
       "      <td>0.731093</td>\n",
       "      <td>0.700981</td>\n",
       "      <td>0.838854</td>\n",
       "      <td>0.922816</td>\n",
       "      <td>0.995913</td>\n",
       "      <td>NaN</td>\n",
       "      <td>17.506022</td>\n",
       "      <td>540</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_neighbors=10,leaf_size=20</th>\n",
       "      <td>0.662288</td>\n",
       "      <td>0.736872</td>\n",
       "      <td>0.628994</td>\n",
       "      <td>0.644989</td>\n",
       "      <td>0.661217</td>\n",
       "      <td>0.736382</td>\n",
       "      <td>0.893642</td>\n",
       "      <td>0.992956</td>\n",
       "      <td>NaN</td>\n",
       "      <td>17.429065</td>\n",
       "      <td>540</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_neighbors=10,leaf_size=30</th>\n",
       "      <td>0.662288</td>\n",
       "      <td>0.736872</td>\n",
       "      <td>0.628994</td>\n",
       "      <td>0.644989</td>\n",
       "      <td>0.661217</td>\n",
       "      <td>0.736382</td>\n",
       "      <td>0.893642</td>\n",
       "      <td>0.992956</td>\n",
       "      <td>NaN</td>\n",
       "      <td>17.360684</td>\n",
       "      <td>540</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_neighbors=10,leaf_size=40</th>\n",
       "      <td>0.662288</td>\n",
       "      <td>0.736872</td>\n",
       "      <td>0.628994</td>\n",
       "      <td>0.644989</td>\n",
       "      <td>0.661217</td>\n",
       "      <td>0.736382</td>\n",
       "      <td>0.893642</td>\n",
       "      <td>0.992956</td>\n",
       "      <td>NaN</td>\n",
       "      <td>17.347841</td>\n",
       "      <td>540</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_neighbors=5,leaf_size=20</th>\n",
       "      <td>0.601604</td>\n",
       "      <td>0.607252</td>\n",
       "      <td>0.578832</td>\n",
       "      <td>0.532535</td>\n",
       "      <td>0.600370</td>\n",
       "      <td>0.601895</td>\n",
       "      <td>0.848374</td>\n",
       "      <td>0.974317</td>\n",
       "      <td>NaN</td>\n",
       "      <td>17.352823</td>\n",
       "      <td>540</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_neighbors=5,leaf_size=30</th>\n",
       "      <td>0.601604</td>\n",
       "      <td>0.607252</td>\n",
       "      <td>0.578832</td>\n",
       "      <td>0.532535</td>\n",
       "      <td>0.600370</td>\n",
       "      <td>0.601895</td>\n",
       "      <td>0.848374</td>\n",
       "      <td>0.974317</td>\n",
       "      <td>NaN</td>\n",
       "      <td>17.485450</td>\n",
       "      <td>540</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_neighbors=5,leaf_size=40</th>\n",
       "      <td>0.601604</td>\n",
       "      <td>0.607252</td>\n",
       "      <td>0.578832</td>\n",
       "      <td>0.532535</td>\n",
       "      <td>0.600370</td>\n",
       "      <td>0.601895</td>\n",
       "      <td>0.848374</td>\n",
       "      <td>0.974317</td>\n",
       "      <td>NaN</td>\n",
       "      <td>17.244517</td>\n",
       "      <td>540</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"3\" valign=\"top\">Subsequence IF</th>\n",
       "      <th>n_trees=100</th>\n",
       "      <td>0.376916</td>\n",
       "      <td>0.198092</td>\n",
       "      <td>0.419436</td>\n",
       "      <td>0.352923</td>\n",
       "      <td>0.374519</td>\n",
       "      <td>0.189624</td>\n",
       "      <td>0.780814</td>\n",
       "      <td>0.851420</td>\n",
       "      <td>NaN</td>\n",
       "      <td>8.530546</td>\n",
       "      <td>540</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_trees=1000</th>\n",
       "      <td>0.379784</td>\n",
       "      <td>0.203766</td>\n",
       "      <td>0.423097</td>\n",
       "      <td>0.366932</td>\n",
       "      <td>0.377547</td>\n",
       "      <td>0.194410</td>\n",
       "      <td>0.779641</td>\n",
       "      <td>0.862844</td>\n",
       "      <td>NaN</td>\n",
       "      <td>19.428554</td>\n",
       "      <td>540</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_trees=10</th>\n",
       "      <td>0.324817</td>\n",
       "      <td>0.134164</td>\n",
       "      <td>0.355094</td>\n",
       "      <td>0.266610</td>\n",
       "      <td>0.322275</td>\n",
       "      <td>0.121945</td>\n",
       "      <td>0.765512</td>\n",
       "      <td>0.831879</td>\n",
       "      <td>NaN</td>\n",
       "      <td>7.418071</td>\n",
       "      <td>540</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"9\" valign=\"top\">Spectral Residual (SR)</th>\n",
       "      <th>mag_window_size=40,score_window_size=28</th>\n",
       "      <td>0.135521</td>\n",
       "      <td>0.054807</td>\n",
       "      <td>0.152279</td>\n",
       "      <td>0.061042</td>\n",
       "      <td>0.135249</td>\n",
       "      <td>0.054243</td>\n",
       "      <td>0.562939</td>\n",
       "      <td>0.535750</td>\n",
       "      <td>NaN</td>\n",
       "      <td>4.967755</td>\n",
       "      <td>540</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mag_window_size=40,score_window_size=52</th>\n",
       "      <td>0.138248</td>\n",
       "      <td>0.064197</td>\n",
       "      <td>0.156260</td>\n",
       "      <td>0.069676</td>\n",
       "      <td>0.137983</td>\n",
       "      <td>0.063120</td>\n",
       "      <td>0.562544</td>\n",
       "      <td>0.537469</td>\n",
       "      <td>NaN</td>\n",
       "      <td>4.897070</td>\n",
       "      <td>540</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mag_window_size=52,score_window_size=28</th>\n",
       "      <td>0.136600</td>\n",
       "      <td>0.055799</td>\n",
       "      <td>0.153906</td>\n",
       "      <td>0.062067</td>\n",
       "      <td>0.136334</td>\n",
       "      <td>0.055456</td>\n",
       "      <td>0.562416</td>\n",
       "      <td>0.534901</td>\n",
       "      <td>NaN</td>\n",
       "      <td>4.823927</td>\n",
       "      <td>540</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mag_window_size=40,score_window_size=40</th>\n",
       "      <td>0.135359</td>\n",
       "      <td>0.061214</td>\n",
       "      <td>0.151881</td>\n",
       "      <td>0.068046</td>\n",
       "      <td>0.135085</td>\n",
       "      <td>0.060187</td>\n",
       "      <td>0.562241</td>\n",
       "      <td>0.536813</td>\n",
       "      <td>NaN</td>\n",
       "      <td>4.812128</td>\n",
       "      <td>540</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mag_window_size=28,score_window_size=28</th>\n",
       "      <td>0.132227</td>\n",
       "      <td>0.053552</td>\n",
       "      <td>0.147685</td>\n",
       "      <td>0.057827</td>\n",
       "      <td>0.131897</td>\n",
       "      <td>0.052179</td>\n",
       "      <td>0.562035</td>\n",
       "      <td>0.535935</td>\n",
       "      <td>NaN</td>\n",
       "      <td>5.099192</td>\n",
       "      <td>540</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mag_window_size=52,score_window_size=52</th>\n",
       "      <td>0.139058</td>\n",
       "      <td>0.064085</td>\n",
       "      <td>0.157829</td>\n",
       "      <td>0.069872</td>\n",
       "      <td>0.138790</td>\n",
       "      <td>0.063183</td>\n",
       "      <td>0.561934</td>\n",
       "      <td>0.537469</td>\n",
       "      <td>NaN</td>\n",
       "      <td>4.888743</td>\n",
       "      <td>540</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mag_window_size=28,score_window_size=52</th>\n",
       "      <td>0.134808</td>\n",
       "      <td>0.062863</td>\n",
       "      <td>0.153432</td>\n",
       "      <td>0.068115</td>\n",
       "      <td>0.135075</td>\n",
       "      <td>0.061975</td>\n",
       "      <td>0.561832</td>\n",
       "      <td>0.537469</td>\n",
       "      <td>NaN</td>\n",
       "      <td>4.962817</td>\n",
       "      <td>540</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mag_window_size=52,score_window_size=40</th>\n",
       "      <td>0.136115</td>\n",
       "      <td>0.061496</td>\n",
       "      <td>0.153653</td>\n",
       "      <td>0.067572</td>\n",
       "      <td>0.135872</td>\n",
       "      <td>0.060770</td>\n",
       "      <td>0.561516</td>\n",
       "      <td>0.535370</td>\n",
       "      <td>NaN</td>\n",
       "      <td>4.862320</td>\n",
       "      <td>540</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mag_window_size=28,score_window_size=40</th>\n",
       "      <td>0.132487</td>\n",
       "      <td>0.060118</td>\n",
       "      <td>0.148035</td>\n",
       "      <td>0.065526</td>\n",
       "      <td>0.132122</td>\n",
       "      <td>0.059424</td>\n",
       "      <td>0.561368</td>\n",
       "      <td>0.537415</td>\n",
       "      <td>NaN</td>\n",
       "      <td>4.931573</td>\n",
       "      <td>540</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"12\" valign=\"top\">Random Forest Regressor (RR)</th>\n",
       "      <th>train_window_size=500,n_trees=1000</th>\n",
       "      <td>0.496948</td>\n",
       "      <td>0.472054</td>\n",
       "      <td>0.465258</td>\n",
       "      <td>0.461625</td>\n",
       "      <td>0.495439</td>\n",
       "      <td>0.471786</td>\n",
       "      <td>0.830238</td>\n",
       "      <td>0.852303</td>\n",
       "      <td>1327.517207</td>\n",
       "      <td>7.116011</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>train_window_size=500,n_trees=100</th>\n",
       "      <td>0.494624</td>\n",
       "      <td>0.466553</td>\n",
       "      <td>0.461462</td>\n",
       "      <td>0.460629</td>\n",
       "      <td>0.493064</td>\n",
       "      <td>0.466347</td>\n",
       "      <td>0.828904</td>\n",
       "      <td>0.850691</td>\n",
       "      <td>140.833740</td>\n",
       "      <td>6.439457</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>train_window_size=1000,n_trees=10</th>\n",
       "      <td>0.496174</td>\n",
       "      <td>0.489318</td>\n",
       "      <td>0.460377</td>\n",
       "      <td>0.486492</td>\n",
       "      <td>0.494751</td>\n",
       "      <td>0.486030</td>\n",
       "      <td>0.826954</td>\n",
       "      <td>0.853791</td>\n",
       "      <td>32.646585</td>\n",
       "      <td>6.621414</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>train_window_size=500,n_trees=10</th>\n",
       "      <td>0.486198</td>\n",
       "      <td>0.450471</td>\n",
       "      <td>0.449886</td>\n",
       "      <td>0.447524</td>\n",
       "      <td>0.484530</td>\n",
       "      <td>0.446820</td>\n",
       "      <td>0.826419</td>\n",
       "      <td>0.841489</td>\n",
       "      <td>20.227891</td>\n",
       "      <td>6.588819</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>train_window_size=1000,n_trees=100</th>\n",
       "      <td>0.505956</td>\n",
       "      <td>0.488078</td>\n",
       "      <td>0.474702</td>\n",
       "      <td>0.500050</td>\n",
       "      <td>0.504709</td>\n",
       "      <td>0.487527</td>\n",
       "      <td>0.825949</td>\n",
       "      <td>0.853423</td>\n",
       "      <td>258.947684</td>\n",
       "      <td>6.222891</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>train_window_size=1000,n_trees=1000</th>\n",
       "      <td>0.507275</td>\n",
       "      <td>0.495994</td>\n",
       "      <td>0.477184</td>\n",
       "      <td>0.500050</td>\n",
       "      <td>0.506014</td>\n",
       "      <td>0.495471</td>\n",
       "      <td>0.825707</td>\n",
       "      <td>0.852895</td>\n",
       "      <td>2534.804197</td>\n",
       "      <td>7.344901</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>train_window_size=100,n_trees=10</th>\n",
       "      <td>0.448465</td>\n",
       "      <td>0.378315</td>\n",
       "      <td>0.416176</td>\n",
       "      <td>0.406361</td>\n",
       "      <td>0.446078</td>\n",
       "      <td>0.374018</td>\n",
       "      <td>0.814787</td>\n",
       "      <td>0.819364</td>\n",
       "      <td>9.429778</td>\n",
       "      <td>6.580194</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>train_window_size=100,n_trees=1000</th>\n",
       "      <td>0.452561</td>\n",
       "      <td>0.389182</td>\n",
       "      <td>0.425199</td>\n",
       "      <td>0.414861</td>\n",
       "      <td>0.450453</td>\n",
       "      <td>0.383125</td>\n",
       "      <td>0.814687</td>\n",
       "      <td>0.831395</td>\n",
       "      <td>283.689249</td>\n",
       "      <td>7.198034</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>train_window_size=100,n_trees=100</th>\n",
       "      <td>0.452611</td>\n",
       "      <td>0.400568</td>\n",
       "      <td>0.423518</td>\n",
       "      <td>0.408754</td>\n",
       "      <td>0.450511</td>\n",
       "      <td>0.399304</td>\n",
       "      <td>0.813792</td>\n",
       "      <td>0.829483</td>\n",
       "      <td>34.904676</td>\n",
       "      <td>6.742528</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>train_window_size=50,n_trees=10</th>\n",
       "      <td>0.443800</td>\n",
       "      <td>0.390487</td>\n",
       "      <td>0.415910</td>\n",
       "      <td>0.430495</td>\n",
       "      <td>0.441728</td>\n",
       "      <td>0.388733</td>\n",
       "      <td>0.789990</td>\n",
       "      <td>0.821722</td>\n",
       "      <td>8.228891</td>\n",
       "      <td>6.877913</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>train_window_size=50,n_trees=1000</th>\n",
       "      <td>0.442893</td>\n",
       "      <td>0.392351</td>\n",
       "      <td>0.419993</td>\n",
       "      <td>0.440647</td>\n",
       "      <td>0.440917</td>\n",
       "      <td>0.389314</td>\n",
       "      <td>0.789582</td>\n",
       "      <td>0.827747</td>\n",
       "      <td>148.225063</td>\n",
       "      <td>7.206852</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>train_window_size=50,n_trees=100</th>\n",
       "      <td>0.442878</td>\n",
       "      <td>0.391809</td>\n",
       "      <td>0.419215</td>\n",
       "      <td>0.442055</td>\n",
       "      <td>0.440853</td>\n",
       "      <td>0.388945</td>\n",
       "      <td>0.789471</td>\n",
       "      <td>0.825072</td>\n",
       "      <td>20.999152</td>\n",
       "      <td>6.580275</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"3\" valign=\"top\">LaserDBN</th>\n",
       "      <th>n_bins=10</th>\n",
       "      <td>0.182588</td>\n",
       "      <td>0.111080</td>\n",
       "      <td>0.217800</td>\n",
       "      <td>0.123854</td>\n",
       "      <td>0.205759</td>\n",
       "      <td>0.120415</td>\n",
       "      <td>0.651637</td>\n",
       "      <td>0.653969</td>\n",
       "      <td>6.195011</td>\n",
       "      <td>6.486712</td>\n",
       "      <td>155</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_bins=8</th>\n",
       "      <td>0.167408</td>\n",
       "      <td>0.077642</td>\n",
       "      <td>0.205831</td>\n",
       "      <td>0.109723</td>\n",
       "      <td>0.189396</td>\n",
       "      <td>0.086610</td>\n",
       "      <td>0.628754</td>\n",
       "      <td>0.608466</td>\n",
       "      <td>6.315164</td>\n",
       "      <td>6.286792</td>\n",
       "      <td>155</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_bins=5</th>\n",
       "      <td>0.118867</td>\n",
       "      <td>0.055562</td>\n",
       "      <td>0.186260</td>\n",
       "      <td>0.091819</td>\n",
       "      <td>0.156960</td>\n",
       "      <td>0.078112</td>\n",
       "      <td>0.587310</td>\n",
       "      <td>0.557852</td>\n",
       "      <td>6.281771</td>\n",
       "      <td>6.517359</td>\n",
       "      <td>155</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"18\" valign=\"top\">Hybrid KNN</th>\n",
       "      <th>n_neighbors=10,n_estimators=1000</th>\n",
       "      <td>0.761506</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>0.400425</td>\n",
       "      <td>0.500050</td>\n",
       "      <td>0.780753</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>0.997410</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>4628.189503</td>\n",
       "      <td>13.640841</td>\n",
       "      <td>155</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_neighbors=5,n_estimators=10</th>\n",
       "      <td>0.481949</td>\n",
       "      <td>0.463410</td>\n",
       "      <td>0.528427</td>\n",
       "      <td>0.490387</td>\n",
       "      <td>0.507717</td>\n",
       "      <td>0.525154</td>\n",
       "      <td>0.871120</td>\n",
       "      <td>0.972022</td>\n",
       "      <td>344.385514</td>\n",
       "      <td>11.646781</td>\n",
       "      <td>155</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_neighbors=10,n_estimators=10</th>\n",
       "      <td>0.428056</td>\n",
       "      <td>0.177605</td>\n",
       "      <td>0.482637</td>\n",
       "      <td>0.388155</td>\n",
       "      <td>0.445695</td>\n",
       "      <td>0.281308</td>\n",
       "      <td>0.820675</td>\n",
       "      <td>0.924911</td>\n",
       "      <td>416.534920</td>\n",
       "      <td>12.203369</td>\n",
       "      <td>155</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_neighbors=20,n_estimators=10</th>\n",
       "      <td>0.395563</td>\n",
       "      <td>0.103635</td>\n",
       "      <td>0.436654</td>\n",
       "      <td>0.325151</td>\n",
       "      <td>0.406462</td>\n",
       "      <td>0.108193</td>\n",
       "      <td>0.761696</td>\n",
       "      <td>0.840679</td>\n",
       "      <td>408.336870</td>\n",
       "      <td>12.601245</td>\n",
       "      <td>155</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_neighbors=30,n_estimators=10</th>\n",
       "      <td>0.370469</td>\n",
       "      <td>0.071476</td>\n",
       "      <td>0.413065</td>\n",
       "      <td>0.266490</td>\n",
       "      <td>0.384227</td>\n",
       "      <td>0.075083</td>\n",
       "      <td>0.716320</td>\n",
       "      <td>0.802893</td>\n",
       "      <td>416.986133</td>\n",
       "      <td>12.916162</td>\n",
       "      <td>155</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_neighbors=5,n_estimators=100</th>\n",
       "      <td>0.367691</td>\n",
       "      <td>0.074466</td>\n",
       "      <td>0.368866</td>\n",
       "      <td>0.229072</td>\n",
       "      <td>0.377516</td>\n",
       "      <td>0.081873</td>\n",
       "      <td>0.700463</td>\n",
       "      <td>0.808382</td>\n",
       "      <td>429.932958</td>\n",
       "      <td>13.492753</td>\n",
       "      <td>155</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_neighbors=40,n_estimators=10</th>\n",
       "      <td>0.367419</td>\n",
       "      <td>0.068651</td>\n",
       "      <td>0.394542</td>\n",
       "      <td>0.262162</td>\n",
       "      <td>0.380848</td>\n",
       "      <td>0.068915</td>\n",
       "      <td>0.699504</td>\n",
       "      <td>0.810781</td>\n",
       "      <td>457.649137</td>\n",
       "      <td>13.167603</td>\n",
       "      <td>155</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_neighbors=50,n_estimators=10</th>\n",
       "      <td>0.360377</td>\n",
       "      <td>0.058048</td>\n",
       "      <td>0.368297</td>\n",
       "      <td>0.215910</td>\n",
       "      <td>0.370661</td>\n",
       "      <td>0.063267</td>\n",
       "      <td>0.695780</td>\n",
       "      <td>0.803726</td>\n",
       "      <td>401.712861</td>\n",
       "      <td>12.895360</td>\n",
       "      <td>155</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_neighbors=10,n_estimators=100</th>\n",
       "      <td>0.237873</td>\n",
       "      <td>0.031569</td>\n",
       "      <td>0.264654</td>\n",
       "      <td>0.168860</td>\n",
       "      <td>0.241096</td>\n",
       "      <td>0.030151</td>\n",
       "      <td>0.542939</td>\n",
       "      <td>0.613657</td>\n",
       "      <td>512.750938</td>\n",
       "      <td>14.913010</td>\n",
       "      <td>155</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_neighbors=20,n_estimators=100</th>\n",
       "      <td>0.179932</td>\n",
       "      <td>0.020848</td>\n",
       "      <td>0.194007</td>\n",
       "      <td>0.111069</td>\n",
       "      <td>0.182669</td>\n",
       "      <td>0.020579</td>\n",
       "      <td>0.483084</td>\n",
       "      <td>0.430480</td>\n",
       "      <td>536.211796</td>\n",
       "      <td>15.631856</td>\n",
       "      <td>155</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_neighbors=30,n_estimators=100</th>\n",
       "      <td>0.171862</td>\n",
       "      <td>0.019348</td>\n",
       "      <td>0.190853</td>\n",
       "      <td>0.112137</td>\n",
       "      <td>0.174245</td>\n",
       "      <td>0.019158</td>\n",
       "      <td>0.466031</td>\n",
       "      <td>0.433788</td>\n",
       "      <td>473.031279</td>\n",
       "      <td>15.969181</td>\n",
       "      <td>155</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_neighbors=40,n_estimators=100</th>\n",
       "      <td>0.153550</td>\n",
       "      <td>0.015578</td>\n",
       "      <td>0.177724</td>\n",
       "      <td>0.109536</td>\n",
       "      <td>0.156343</td>\n",
       "      <td>0.015419</td>\n",
       "      <td>0.444610</td>\n",
       "      <td>0.404847</td>\n",
       "      <td>510.991568</td>\n",
       "      <td>17.428080</td>\n",
       "      <td>155</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_neighbors=5,n_estimators=1000</th>\n",
       "      <td>0.130179</td>\n",
       "      <td>0.014819</td>\n",
       "      <td>0.168955</td>\n",
       "      <td>0.105234</td>\n",
       "      <td>0.133322</td>\n",
       "      <td>0.014671</td>\n",
       "      <td>0.423783</td>\n",
       "      <td>0.386913</td>\n",
       "      <td>3113.433991</td>\n",
       "      <td>17.813734</td>\n",
       "      <td>155</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_neighbors=50,n_estimators=100</th>\n",
       "      <td>0.123803</td>\n",
       "      <td>0.014533</td>\n",
       "      <td>0.169736</td>\n",
       "      <td>0.112258</td>\n",
       "      <td>0.128505</td>\n",
       "      <td>0.014389</td>\n",
       "      <td>0.405481</td>\n",
       "      <td>0.363171</td>\n",
       "      <td>519.436985</td>\n",
       "      <td>18.244306</td>\n",
       "      <td>155</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_neighbors=20,n_estimators=1000</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>155</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_neighbors=30,n_estimators=1000</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>155</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_neighbors=40,n_estimators=1000</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>155</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>n_neighbors=50,n_estimators=1000</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>155</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"5\" valign=\"top\">FFT</th>\n",
       "      <th>context_window_size=5</th>\n",
       "      <td>0.331767</td>\n",
       "      <td>0.100000</td>\n",
       "      <td>0.455646</td>\n",
       "      <td>0.505000</td>\n",
       "      <td>0.473597</td>\n",
       "      <td>0.505000</td>\n",
       "      <td>0.642093</td>\n",
       "      <td>0.560266</td>\n",
       "      <td>NaN</td>\n",
       "      <td>5.347193</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>context_window_size=10</th>\n",
       "      <td>0.305200</td>\n",
       "      <td>0.080100</td>\n",
       "      <td>0.436404</td>\n",
       "      <td>0.505000</td>\n",
       "      <td>0.453547</td>\n",
       "      <td>0.505000</td>\n",
       "      <td>0.632059</td>\n",
       "      <td>0.541255</td>\n",
       "      <td>NaN</td>\n",
       "      <td>5.540541</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>context_window_size=30</th>\n",
       "      <td>0.294507</td>\n",
       "      <td>0.080100</td>\n",
       "      <td>0.442676</td>\n",
       "      <td>0.505000</td>\n",
       "      <td>0.463853</td>\n",
       "      <td>0.505000</td>\n",
       "      <td>0.627192</td>\n",
       "      <td>0.559394</td>\n",
       "      <td>NaN</td>\n",
       "      <td>5.638268</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>context_window_size=50</th>\n",
       "      <td>0.291152</td>\n",
       "      <td>0.100000</td>\n",
       "      <td>0.450586</td>\n",
       "      <td>0.505000</td>\n",
       "      <td>0.469732</td>\n",
       "      <td>0.505000</td>\n",
       "      <td>0.618787</td>\n",
       "      <td>0.531680</td>\n",
       "      <td>NaN</td>\n",
       "      <td>5.234794</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>context_window_size=40</th>\n",
       "      <td>0.281727</td>\n",
       "      <td>0.073700</td>\n",
       "      <td>0.425668</td>\n",
       "      <td>0.505000</td>\n",
       "      <td>0.446084</td>\n",
       "      <td>0.505000</td>\n",
       "      <td>0.618658</td>\n",
       "      <td>0.539432</td>\n",
       "      <td>NaN</td>\n",
       "      <td>5.750805</td>\n",
       "      <td>135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"4\" valign=\"top\">DeepAnT</th>\n",
       "      <th>prediction_window_size=50</th>\n",
       "      <td>0.656307</td>\n",
       "      <td>0.828939</td>\n",
       "      <td>0.624717</td>\n",
       "      <td>0.727927</td>\n",
       "      <td>0.650221</td>\n",
       "      <td>0.828401</td>\n",
       "      <td>0.887537</td>\n",
       "      <td>0.996496</td>\n",
       "      <td>3989.792651</td>\n",
       "      <td>10.798391</td>\n",
       "      <td>620</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>prediction_window_size=1</th>\n",
       "      <td>0.574987</td>\n",
       "      <td>0.650758</td>\n",
       "      <td>0.563817</td>\n",
       "      <td>0.576116</td>\n",
       "      <td>0.569050</td>\n",
       "      <td>0.650143</td>\n",
       "      <td>0.865365</td>\n",
       "      <td>0.991559</td>\n",
       "      <td>3987.373678</td>\n",
       "      <td>10.854502</td>\n",
       "      <td>620</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>prediction_window_size=5</th>\n",
       "      <td>0.526721</td>\n",
       "      <td>0.581798</td>\n",
       "      <td>0.558432</td>\n",
       "      <td>0.540302</td>\n",
       "      <td>0.520746</td>\n",
       "      <td>0.581242</td>\n",
       "      <td>0.781450</td>\n",
       "      <td>0.988733</td>\n",
       "      <td>4060.859754</td>\n",
       "      <td>10.606166</td>\n",
       "      <td>620</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>prediction_window_size=10</th>\n",
       "      <td>0.468938</td>\n",
       "      <td>0.456518</td>\n",
       "      <td>0.519357</td>\n",
       "      <td>0.484113</td>\n",
       "      <td>0.462142</td>\n",
       "      <td>0.397351</td>\n",
       "      <td>0.722039</td>\n",
       "      <td>0.977391</td>\n",
       "      <td>3935.055738</td>\n",
       "      <td>11.053138</td>\n",
       "      <td>620</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                                                AVERAGE_PRECISION  \\\n",
       "                                                                                             mean   \n",
       "algorithm                    optim_params                                                           \n",
       "k-Means                      n_clusters=50                                               0.731988   \n",
       "                             n_clusters=10                                               0.633051   \n",
       "                             n_clusters=40                                               0.735390   \n",
       "                             n_clusters=30                                               0.717902   \n",
       "                             n_clusters=5                                                0.508202   \n",
       "XGBoosting (RR)              n_estimators=100,train_window_size=500,n_trees=10           0.577270   \n",
       "                             n_estimators=1000,train_window_size=500,n_trees=10          0.595681   \n",
       "                             n_estimators=100,train_window_size=1000,n_trees=10          0.575332   \n",
       "                             n_estimators=1000,train_window_size=100,n_trees=10          0.543180   \n",
       "                             n_estimators=100,train_window_size=100,n_trees=10           0.539758   \n",
       "                             n_estimators=100,train_window_size=50,n_trees=1000          0.580512   \n",
       "                             n_estimators=100,train_window_size=100,n_trees=100          0.539697   \n",
       "                             n_estimators=1000,train_window_size=50,n_trees=100          0.577064   \n",
       "                             n_estimators=100,train_window_size=500,n_trees=100          0.566974   \n",
       "                             n_estimators=1000,train_window_size=50,n_trees=10           0.537368   \n",
       "                             n_estimators=100,train_window_size=50,n_trees=100           0.529155   \n",
       "                             n_estimators=100,train_window_size=50,n_trees=10            0.529162   \n",
       "                             n_estimators=10,train_window_size=500,n_trees=1000          0.229250   \n",
       "                             n_estimators=10,train_window_size=1000,n_trees=100          0.179102   \n",
       "                             n_estimators=10,train_window_size=1000,n_trees=10           0.179040   \n",
       "                             n_estimators=10,train_window_size=500,n_trees=100           0.174391   \n",
       "                             n_estimators=10,train_window_size=500,n_trees=10            0.174494   \n",
       "                             n_estimators=10,train_window_size=100,n_trees=1000          0.174394   \n",
       "                             n_estimators=10,train_window_size=100,n_trees=100           0.174482   \n",
       "                             n_estimators=10,train_window_size=100,n_trees=10            0.174541   \n",
       "                             n_estimators=10,train_window_size=50,n_trees=10             0.170264   \n",
       "                             n_estimators=10,train_window_size=50,n_trees=1000           0.170302   \n",
       "                             n_estimators=10,train_window_size=50,n_trees=100            0.170352   \n",
       "                             n_estimators=10,train_window_size=1000,n_trees=...               NaN   \n",
       "                             n_estimators=100,train_window_size=100,n_trees=...               NaN   \n",
       "                             n_estimators=100,train_window_size=1000,n_trees...               NaN   \n",
       "                             n_estimators=100,train_window_size=1000,n_trees...               NaN   \n",
       "                             n_estimators=100,train_window_size=500,n_trees=...               NaN   \n",
       "                             n_estimators=1000,train_window_size=100,n_trees...               NaN   \n",
       "                             n_estimators=1000,train_window_size=100,n_trees...               NaN   \n",
       "                             n_estimators=1000,train_window_size=1000,n_tree...               NaN   \n",
       "                             n_estimators=1000,train_window_size=1000,n_tree...               NaN   \n",
       "                             n_estimators=1000,train_window_size=1000,n_tree...               NaN   \n",
       "                             n_estimators=1000,train_window_size=50,n_trees=...               NaN   \n",
       "                             n_estimators=1000,train_window_size=500,n_trees...               NaN   \n",
       "                             n_estimators=1000,train_window_size=500,n_trees...               NaN   \n",
       "Subsequence LOF              n_neighbors=50,leaf_size=20                                 0.745121   \n",
       "                             n_neighbors=50,leaf_size=30                                 0.745121   \n",
       "                             n_neighbors=50,leaf_size=40                                 0.745121   \n",
       "                             n_neighbors=40,leaf_size=20                                 0.738201   \n",
       "                             n_neighbors=40,leaf_size=30                                 0.738201   \n",
       "                             n_neighbors=40,leaf_size=40                                 0.738201   \n",
       "                             n_neighbors=30,leaf_size=20                                 0.721686   \n",
       "                             n_neighbors=30,leaf_size=30                                 0.721686   \n",
       "                             n_neighbors=30,leaf_size=40                                 0.721686   \n",
       "                             n_neighbors=20,leaf_size=20                                 0.702056   \n",
       "                             n_neighbors=20,leaf_size=30                                 0.702056   \n",
       "                             n_neighbors=20,leaf_size=40                                 0.702056   \n",
       "                             n_neighbors=10,leaf_size=20                                 0.662288   \n",
       "                             n_neighbors=10,leaf_size=30                                 0.662288   \n",
       "                             n_neighbors=10,leaf_size=40                                 0.662288   \n",
       "                             n_neighbors=5,leaf_size=20                                  0.601604   \n",
       "                             n_neighbors=5,leaf_size=30                                  0.601604   \n",
       "                             n_neighbors=5,leaf_size=40                                  0.601604   \n",
       "Subsequence IF               n_trees=100                                                 0.376916   \n",
       "                             n_trees=1000                                                0.379784   \n",
       "                             n_trees=10                                                  0.324817   \n",
       "Spectral Residual (SR)       mag_window_size=40,score_window_size=28                     0.135521   \n",
       "                             mag_window_size=40,score_window_size=52                     0.138248   \n",
       "                             mag_window_size=52,score_window_size=28                     0.136600   \n",
       "                             mag_window_size=40,score_window_size=40                     0.135359   \n",
       "                             mag_window_size=28,score_window_size=28                     0.132227   \n",
       "                             mag_window_size=52,score_window_size=52                     0.139058   \n",
       "                             mag_window_size=28,score_window_size=52                     0.134808   \n",
       "                             mag_window_size=52,score_window_size=40                     0.136115   \n",
       "                             mag_window_size=28,score_window_size=40                     0.132487   \n",
       "Random Forest Regressor (RR) train_window_size=500,n_trees=1000                          0.496948   \n",
       "                             train_window_size=500,n_trees=100                           0.494624   \n",
       "                             train_window_size=1000,n_trees=10                           0.496174   \n",
       "                             train_window_size=500,n_trees=10                            0.486198   \n",
       "                             train_window_size=1000,n_trees=100                          0.505956   \n",
       "                             train_window_size=1000,n_trees=1000                         0.507275   \n",
       "                             train_window_size=100,n_trees=10                            0.448465   \n",
       "                             train_window_size=100,n_trees=1000                          0.452561   \n",
       "                             train_window_size=100,n_trees=100                           0.452611   \n",
       "                             train_window_size=50,n_trees=10                             0.443800   \n",
       "                             train_window_size=50,n_trees=1000                           0.442893   \n",
       "                             train_window_size=50,n_trees=100                            0.442878   \n",
       "LaserDBN                     n_bins=10                                                   0.182588   \n",
       "                             n_bins=8                                                    0.167408   \n",
       "                             n_bins=5                                                    0.118867   \n",
       "Hybrid KNN                   n_neighbors=10,n_estimators=1000                            0.761506   \n",
       "                             n_neighbors=5,n_estimators=10                               0.481949   \n",
       "                             n_neighbors=10,n_estimators=10                              0.428056   \n",
       "                             n_neighbors=20,n_estimators=10                              0.395563   \n",
       "                             n_neighbors=30,n_estimators=10                              0.370469   \n",
       "                             n_neighbors=5,n_estimators=100                              0.367691   \n",
       "                             n_neighbors=40,n_estimators=10                              0.367419   \n",
       "                             n_neighbors=50,n_estimators=10                              0.360377   \n",
       "                             n_neighbors=10,n_estimators=100                             0.237873   \n",
       "                             n_neighbors=20,n_estimators=100                             0.179932   \n",
       "                             n_neighbors=30,n_estimators=100                             0.171862   \n",
       "                             n_neighbors=40,n_estimators=100                             0.153550   \n",
       "                             n_neighbors=5,n_estimators=1000                             0.130179   \n",
       "                             n_neighbors=50,n_estimators=100                             0.123803   \n",
       "                             n_neighbors=20,n_estimators=1000                                 NaN   \n",
       "                             n_neighbors=30,n_estimators=1000                                 NaN   \n",
       "                             n_neighbors=40,n_estimators=1000                                 NaN   \n",
       "                             n_neighbors=50,n_estimators=1000                                 NaN   \n",
       "FFT                          context_window_size=5                                       0.331767   \n",
       "                             context_window_size=10                                      0.305200   \n",
       "                             context_window_size=30                                      0.294507   \n",
       "                             context_window_size=50                                      0.291152   \n",
       "                             context_window_size=40                                      0.281727   \n",
       "DeepAnT                      prediction_window_size=50                                   0.656307   \n",
       "                             prediction_window_size=1                                    0.574987   \n",
       "                             prediction_window_size=5                                    0.526721   \n",
       "                             prediction_window_size=10                                   0.468938   \n",
       "\n",
       "                                                                                           \\\n",
       "                                                                                   median   \n",
       "algorithm                    optim_params                                                   \n",
       "k-Means                      n_clusters=50                                       0.907493   \n",
       "                             n_clusters=10                                       0.813983   \n",
       "                             n_clusters=40                                       0.909753   \n",
       "                             n_clusters=30                                       0.901508   \n",
       "                             n_clusters=5                                        0.504451   \n",
       "XGBoosting (RR)              n_estimators=100,train_window_size=500,n_trees=10   0.604820   \n",
       "                             n_estimators=1000,train_window_size=500,n_trees=10  0.640770   \n",
       "                             n_estimators=100,train_window_size=1000,n_trees=10  0.605053   \n",
       "                             n_estimators=1000,train_window_size=100,n_trees=10  0.566363   \n",
       "                             n_estimators=100,train_window_size=100,n_trees=10   0.548155   \n",
       "                             n_estimators=100,train_window_size=50,n_trees=1000  0.642343   \n",
       "                             n_estimators=100,train_window_size=100,n_trees=100  0.550340   \n",
       "                             n_estimators=1000,train_window_size=50,n_trees=100  0.596543   \n",
       "                             n_estimators=100,train_window_size=500,n_trees=100  0.636175   \n",
       "                             n_estimators=1000,train_window_size=50,n_trees=10   0.574096   \n",
       "                             n_estimators=100,train_window_size=50,n_trees=100   0.556053   \n",
       "                             n_estimators=100,train_window_size=50,n_trees=10    0.560240   \n",
       "                             n_estimators=10,train_window_size=500,n_trees=1000  0.143352   \n",
       "                             n_estimators=10,train_window_size=1000,n_trees=100  0.093609   \n",
       "                             n_estimators=10,train_window_size=1000,n_trees=10   0.093609   \n",
       "                             n_estimators=10,train_window_size=500,n_trees=100   0.087336   \n",
       "                             n_estimators=10,train_window_size=500,n_trees=10    0.087336   \n",
       "                             n_estimators=10,train_window_size=100,n_trees=1000  0.090088   \n",
       "                             n_estimators=10,train_window_size=100,n_trees=100   0.093290   \n",
       "                             n_estimators=10,train_window_size=100,n_trees=10    0.093254   \n",
       "                             n_estimators=10,train_window_size=50,n_trees=10     0.079827   \n",
       "                             n_estimators=10,train_window_size=50,n_trees=1000   0.079827   \n",
       "                             n_estimators=10,train_window_size=50,n_trees=100    0.079827   \n",
       "                             n_estimators=10,train_window_size=1000,n_trees=...       NaN   \n",
       "                             n_estimators=100,train_window_size=100,n_trees=...       NaN   \n",
       "                             n_estimators=100,train_window_size=1000,n_trees...       NaN   \n",
       "                             n_estimators=100,train_window_size=1000,n_trees...       NaN   \n",
       "                             n_estimators=100,train_window_size=500,n_trees=...       NaN   \n",
       "                             n_estimators=1000,train_window_size=100,n_trees...       NaN   \n",
       "                             n_estimators=1000,train_window_size=100,n_trees...       NaN   \n",
       "                             n_estimators=1000,train_window_size=1000,n_tree...       NaN   \n",
       "                             n_estimators=1000,train_window_size=1000,n_tree...       NaN   \n",
       "                             n_estimators=1000,train_window_size=1000,n_tree...       NaN   \n",
       "                             n_estimators=1000,train_window_size=50,n_trees=...       NaN   \n",
       "                             n_estimators=1000,train_window_size=500,n_trees...       NaN   \n",
       "                             n_estimators=1000,train_window_size=500,n_trees...       NaN   \n",
       "Subsequence LOF              n_neighbors=50,leaf_size=20                         0.882197   \n",
       "                             n_neighbors=50,leaf_size=30                         0.882197   \n",
       "                             n_neighbors=50,leaf_size=40                         0.882197   \n",
       "                             n_neighbors=40,leaf_size=20                         0.873758   \n",
       "                             n_neighbors=40,leaf_size=30                         0.873758   \n",
       "                             n_neighbors=40,leaf_size=40                         0.873758   \n",
       "                             n_neighbors=30,leaf_size=20                         0.871042   \n",
       "                             n_neighbors=30,leaf_size=30                         0.871042   \n",
       "                             n_neighbors=30,leaf_size=40                         0.871042   \n",
       "                             n_neighbors=20,leaf_size=20                         0.839087   \n",
       "                             n_neighbors=20,leaf_size=30                         0.839087   \n",
       "                             n_neighbors=20,leaf_size=40                         0.839087   \n",
       "                             n_neighbors=10,leaf_size=20                         0.736872   \n",
       "                             n_neighbors=10,leaf_size=30                         0.736872   \n",
       "                             n_neighbors=10,leaf_size=40                         0.736872   \n",
       "                             n_neighbors=5,leaf_size=20                          0.607252   \n",
       "                             n_neighbors=5,leaf_size=30                          0.607252   \n",
       "                             n_neighbors=5,leaf_size=40                          0.607252   \n",
       "Subsequence IF               n_trees=100                                         0.198092   \n",
       "                             n_trees=1000                                        0.203766   \n",
       "                             n_trees=10                                          0.134164   \n",
       "Spectral Residual (SR)       mag_window_size=40,score_window_size=28             0.054807   \n",
       "                             mag_window_size=40,score_window_size=52             0.064197   \n",
       "                             mag_window_size=52,score_window_size=28             0.055799   \n",
       "                             mag_window_size=40,score_window_size=40             0.061214   \n",
       "                             mag_window_size=28,score_window_size=28             0.053552   \n",
       "                             mag_window_size=52,score_window_size=52             0.064085   \n",
       "                             mag_window_size=28,score_window_size=52             0.062863   \n",
       "                             mag_window_size=52,score_window_size=40             0.061496   \n",
       "                             mag_window_size=28,score_window_size=40             0.060118   \n",
       "Random Forest Regressor (RR) train_window_size=500,n_trees=1000                  0.472054   \n",
       "                             train_window_size=500,n_trees=100                   0.466553   \n",
       "                             train_window_size=1000,n_trees=10                   0.489318   \n",
       "                             train_window_size=500,n_trees=10                    0.450471   \n",
       "                             train_window_size=1000,n_trees=100                  0.488078   \n",
       "                             train_window_size=1000,n_trees=1000                 0.495994   \n",
       "                             train_window_size=100,n_trees=10                    0.378315   \n",
       "                             train_window_size=100,n_trees=1000                  0.389182   \n",
       "                             train_window_size=100,n_trees=100                   0.400568   \n",
       "                             train_window_size=50,n_trees=10                     0.390487   \n",
       "                             train_window_size=50,n_trees=1000                   0.392351   \n",
       "                             train_window_size=50,n_trees=100                    0.391809   \n",
       "LaserDBN                     n_bins=10                                           0.111080   \n",
       "                             n_bins=8                                            0.077642   \n",
       "                             n_bins=5                                            0.055562   \n",
       "Hybrid KNN                   n_neighbors=10,n_estimators=1000                    1.000000   \n",
       "                             n_neighbors=5,n_estimators=10                       0.463410   \n",
       "                             n_neighbors=10,n_estimators=10                      0.177605   \n",
       "                             n_neighbors=20,n_estimators=10                      0.103635   \n",
       "                             n_neighbors=30,n_estimators=10                      0.071476   \n",
       "                             n_neighbors=5,n_estimators=100                      0.074466   \n",
       "                             n_neighbors=40,n_estimators=10                      0.068651   \n",
       "                             n_neighbors=50,n_estimators=10                      0.058048   \n",
       "                             n_neighbors=10,n_estimators=100                     0.031569   \n",
       "                             n_neighbors=20,n_estimators=100                     0.020848   \n",
       "                             n_neighbors=30,n_estimators=100                     0.019348   \n",
       "                             n_neighbors=40,n_estimators=100                     0.015578   \n",
       "                             n_neighbors=5,n_estimators=1000                     0.014819   \n",
       "                             n_neighbors=50,n_estimators=100                     0.014533   \n",
       "                             n_neighbors=20,n_estimators=1000                         NaN   \n",
       "                             n_neighbors=30,n_estimators=1000                         NaN   \n",
       "                             n_neighbors=40,n_estimators=1000                         NaN   \n",
       "                             n_neighbors=50,n_estimators=1000                         NaN   \n",
       "FFT                          context_window_size=5                               0.100000   \n",
       "                             context_window_size=10                              0.080100   \n",
       "                             context_window_size=30                              0.080100   \n",
       "                             context_window_size=50                              0.100000   \n",
       "                             context_window_size=40                              0.073700   \n",
       "DeepAnT                      prediction_window_size=50                           0.828939   \n",
       "                             prediction_window_size=1                            0.650758   \n",
       "                             prediction_window_size=5                            0.581798   \n",
       "                             prediction_window_size=10                           0.456518   \n",
       "\n",
       "                                                                                RANGE_PR_AUC  \\\n",
       "                                                                                        mean   \n",
       "algorithm                    optim_params                                                      \n",
       "k-Means                      n_clusters=50                                          0.734732   \n",
       "                             n_clusters=10                                          0.574486   \n",
       "                             n_clusters=40                                          0.731646   \n",
       "                             n_clusters=30                                          0.710469   \n",
       "                             n_clusters=5                                           0.475376   \n",
       "XGBoosting (RR)              n_estimators=100,train_window_size=500,n_trees=10      0.540322   \n",
       "                             n_estimators=1000,train_window_size=500,n_trees=10     0.560162   \n",
       "                             n_estimators=100,train_window_size=1000,n_trees=10     0.540936   \n",
       "                             n_estimators=1000,train_window_size=100,n_trees=10     0.506579   \n",
       "                             n_estimators=100,train_window_size=100,n_trees=10      0.503763   \n",
       "                             n_estimators=100,train_window_size=50,n_trees=1000     0.533282   \n",
       "                             n_estimators=100,train_window_size=100,n_trees=100     0.503908   \n",
       "                             n_estimators=1000,train_window_size=50,n_trees=100     0.472797   \n",
       "                             n_estimators=100,train_window_size=500,n_trees=100     0.488478   \n",
       "                             n_estimators=1000,train_window_size=50,n_trees=10      0.496935   \n",
       "                             n_estimators=100,train_window_size=50,n_trees=100      0.489409   \n",
       "                             n_estimators=100,train_window_size=50,n_trees=10       0.489739   \n",
       "                             n_estimators=10,train_window_size=500,n_trees=1000     0.290242   \n",
       "                             n_estimators=10,train_window_size=1000,n_trees=100     0.279673   \n",
       "                             n_estimators=10,train_window_size=1000,n_trees=10      0.279196   \n",
       "                             n_estimators=10,train_window_size=500,n_trees=100      0.275026   \n",
       "                             n_estimators=10,train_window_size=500,n_trees=10       0.275069   \n",
       "                             n_estimators=10,train_window_size=100,n_trees=1000     0.273129   \n",
       "                             n_estimators=10,train_window_size=100,n_trees=100      0.272927   \n",
       "                             n_estimators=10,train_window_size=100,n_trees=10       0.273224   \n",
       "                             n_estimators=10,train_window_size=50,n_trees=10        0.271350   \n",
       "                             n_estimators=10,train_window_size=50,n_trees=1000      0.271191   \n",
       "                             n_estimators=10,train_window_size=50,n_trees=100       0.271405   \n",
       "                             n_estimators=10,train_window_size=1000,n_trees=...          NaN   \n",
       "                             n_estimators=100,train_window_size=100,n_trees=...          NaN   \n",
       "                             n_estimators=100,train_window_size=1000,n_trees...          NaN   \n",
       "                             n_estimators=100,train_window_size=1000,n_trees...          NaN   \n",
       "                             n_estimators=100,train_window_size=500,n_trees=...          NaN   \n",
       "                             n_estimators=1000,train_window_size=100,n_trees...          NaN   \n",
       "                             n_estimators=1000,train_window_size=100,n_trees...          NaN   \n",
       "                             n_estimators=1000,train_window_size=1000,n_tree...          NaN   \n",
       "                             n_estimators=1000,train_window_size=1000,n_tree...          NaN   \n",
       "                             n_estimators=1000,train_window_size=1000,n_tree...          NaN   \n",
       "                             n_estimators=1000,train_window_size=50,n_trees=...          NaN   \n",
       "                             n_estimators=1000,train_window_size=500,n_trees...          NaN   \n",
       "                             n_estimators=1000,train_window_size=500,n_trees...          NaN   \n",
       "Subsequence LOF              n_neighbors=50,leaf_size=20                            0.707190   \n",
       "                             n_neighbors=50,leaf_size=30                            0.707190   \n",
       "                             n_neighbors=50,leaf_size=40                            0.707190   \n",
       "                             n_neighbors=40,leaf_size=20                            0.699009   \n",
       "                             n_neighbors=40,leaf_size=30                            0.699009   \n",
       "                             n_neighbors=40,leaf_size=40                            0.699009   \n",
       "                             n_neighbors=30,leaf_size=20                            0.682854   \n",
       "                             n_neighbors=30,leaf_size=30                            0.682854   \n",
       "                             n_neighbors=30,leaf_size=40                            0.682854   \n",
       "                             n_neighbors=20,leaf_size=20                            0.661447   \n",
       "                             n_neighbors=20,leaf_size=30                            0.661447   \n",
       "                             n_neighbors=20,leaf_size=40                            0.661447   \n",
       "                             n_neighbors=10,leaf_size=20                            0.628994   \n",
       "                             n_neighbors=10,leaf_size=30                            0.628994   \n",
       "                             n_neighbors=10,leaf_size=40                            0.628994   \n",
       "                             n_neighbors=5,leaf_size=20                             0.578832   \n",
       "                             n_neighbors=5,leaf_size=30                             0.578832   \n",
       "                             n_neighbors=5,leaf_size=40                             0.578832   \n",
       "Subsequence IF               n_trees=100                                            0.419436   \n",
       "                             n_trees=1000                                           0.423097   \n",
       "                             n_trees=10                                             0.355094   \n",
       "Spectral Residual (SR)       mag_window_size=40,score_window_size=28                0.152279   \n",
       "                             mag_window_size=40,score_window_size=52                0.156260   \n",
       "                             mag_window_size=52,score_window_size=28                0.153906   \n",
       "                             mag_window_size=40,score_window_size=40                0.151881   \n",
       "                             mag_window_size=28,score_window_size=28                0.147685   \n",
       "                             mag_window_size=52,score_window_size=52                0.157829   \n",
       "                             mag_window_size=28,score_window_size=52                0.153432   \n",
       "                             mag_window_size=52,score_window_size=40                0.153653   \n",
       "                             mag_window_size=28,score_window_size=40                0.148035   \n",
       "Random Forest Regressor (RR) train_window_size=500,n_trees=1000                     0.465258   \n",
       "                             train_window_size=500,n_trees=100                      0.461462   \n",
       "                             train_window_size=1000,n_trees=10                      0.460377   \n",
       "                             train_window_size=500,n_trees=10                       0.449886   \n",
       "                             train_window_size=1000,n_trees=100                     0.474702   \n",
       "                             train_window_size=1000,n_trees=1000                    0.477184   \n",
       "                             train_window_size=100,n_trees=10                       0.416176   \n",
       "                             train_window_size=100,n_trees=1000                     0.425199   \n",
       "                             train_window_size=100,n_trees=100                      0.423518   \n",
       "                             train_window_size=50,n_trees=10                        0.415910   \n",
       "                             train_window_size=50,n_trees=1000                      0.419993   \n",
       "                             train_window_size=50,n_trees=100                       0.419215   \n",
       "LaserDBN                     n_bins=10                                              0.217800   \n",
       "                             n_bins=8                                               0.205831   \n",
       "                             n_bins=5                                               0.186260   \n",
       "Hybrid KNN                   n_neighbors=10,n_estimators=1000                       0.400425   \n",
       "                             n_neighbors=5,n_estimators=10                          0.528427   \n",
       "                             n_neighbors=10,n_estimators=10                         0.482637   \n",
       "                             n_neighbors=20,n_estimators=10                         0.436654   \n",
       "                             n_neighbors=30,n_estimators=10                         0.413065   \n",
       "                             n_neighbors=5,n_estimators=100                         0.368866   \n",
       "                             n_neighbors=40,n_estimators=10                         0.394542   \n",
       "                             n_neighbors=50,n_estimators=10                         0.368297   \n",
       "                             n_neighbors=10,n_estimators=100                        0.264654   \n",
       "                             n_neighbors=20,n_estimators=100                        0.194007   \n",
       "                             n_neighbors=30,n_estimators=100                        0.190853   \n",
       "                             n_neighbors=40,n_estimators=100                        0.177724   \n",
       "                             n_neighbors=5,n_estimators=1000                        0.168955   \n",
       "                             n_neighbors=50,n_estimators=100                        0.169736   \n",
       "                             n_neighbors=20,n_estimators=1000                            NaN   \n",
       "                             n_neighbors=30,n_estimators=1000                            NaN   \n",
       "                             n_neighbors=40,n_estimators=1000                            NaN   \n",
       "                             n_neighbors=50,n_estimators=1000                            NaN   \n",
       "FFT                          context_window_size=5                                  0.455646   \n",
       "                             context_window_size=10                                 0.436404   \n",
       "                             context_window_size=30                                 0.442676   \n",
       "                             context_window_size=50                                 0.450586   \n",
       "                             context_window_size=40                                 0.425668   \n",
       "DeepAnT                      prediction_window_size=50                              0.624717   \n",
       "                             prediction_window_size=1                               0.563817   \n",
       "                             prediction_window_size=5                               0.558432   \n",
       "                             prediction_window_size=10                              0.519357   \n",
       "\n",
       "                                                                                           \\\n",
       "                                                                                   median   \n",
       "algorithm                    optim_params                                                   \n",
       "k-Means                      n_clusters=50                                       0.900248   \n",
       "                             n_clusters=10                                       0.595478   \n",
       "                             n_clusters=40                                       0.904161   \n",
       "                             n_clusters=30                                       0.859732   \n",
       "                             n_clusters=5                                        0.458131   \n",
       "XGBoosting (RR)              n_estimators=100,train_window_size=500,n_trees=10   0.555543   \n",
       "                             n_estimators=1000,train_window_size=500,n_trees=10  0.605990   \n",
       "                             n_estimators=100,train_window_size=1000,n_trees=10  0.566939   \n",
       "                             n_estimators=1000,train_window_size=100,n_trees=10  0.500050   \n",
       "                             n_estimators=100,train_window_size=100,n_trees=10   0.500050   \n",
       "                             n_estimators=100,train_window_size=50,n_trees=1000  0.510869   \n",
       "                             n_estimators=100,train_window_size=100,n_trees=100  0.500050   \n",
       "                             n_estimators=1000,train_window_size=50,n_trees=100  0.500050   \n",
       "                             n_estimators=100,train_window_size=500,n_trees=100  0.500050   \n",
       "                             n_estimators=1000,train_window_size=50,n_trees=10   0.500050   \n",
       "                             n_estimators=100,train_window_size=50,n_trees=100   0.500050   \n",
       "                             n_estimators=100,train_window_size=50,n_trees=10    0.500050   \n",
       "                             n_estimators=10,train_window_size=500,n_trees=1000  0.261557   \n",
       "                             n_estimators=10,train_window_size=1000,n_trees=100  0.218113   \n",
       "                             n_estimators=10,train_window_size=1000,n_trees=10   0.218114   \n",
       "                             n_estimators=10,train_window_size=500,n_trees=100   0.220039   \n",
       "                             n_estimators=10,train_window_size=500,n_trees=10    0.220039   \n",
       "                             n_estimators=10,train_window_size=100,n_trees=1000  0.222843   \n",
       "                             n_estimators=10,train_window_size=100,n_trees=100   0.222832   \n",
       "                             n_estimators=10,train_window_size=100,n_trees=10    0.222829   \n",
       "                             n_estimators=10,train_window_size=50,n_trees=10     0.204957   \n",
       "                             n_estimators=10,train_window_size=50,n_trees=1000   0.205015   \n",
       "                             n_estimators=10,train_window_size=50,n_trees=100    0.204956   \n",
       "                             n_estimators=10,train_window_size=1000,n_trees=...       NaN   \n",
       "                             n_estimators=100,train_window_size=100,n_trees=...       NaN   \n",
       "                             n_estimators=100,train_window_size=1000,n_trees...       NaN   \n",
       "                             n_estimators=100,train_window_size=1000,n_trees...       NaN   \n",
       "                             n_estimators=100,train_window_size=500,n_trees=...       NaN   \n",
       "                             n_estimators=1000,train_window_size=100,n_trees...       NaN   \n",
       "                             n_estimators=1000,train_window_size=100,n_trees...       NaN   \n",
       "                             n_estimators=1000,train_window_size=1000,n_tree...       NaN   \n",
       "                             n_estimators=1000,train_window_size=1000,n_tree...       NaN   \n",
       "                             n_estimators=1000,train_window_size=1000,n_tree...       NaN   \n",
       "                             n_estimators=1000,train_window_size=50,n_trees=...       NaN   \n",
       "                             n_estimators=1000,train_window_size=500,n_trees...       NaN   \n",
       "                             n_estimators=1000,train_window_size=500,n_trees...       NaN   \n",
       "Subsequence LOF              n_neighbors=50,leaf_size=20                         0.775156   \n",
       "                             n_neighbors=50,leaf_size=30                         0.775156   \n",
       "                             n_neighbors=50,leaf_size=40                         0.775156   \n",
       "                             n_neighbors=40,leaf_size=20                         0.776050   \n",
       "                             n_neighbors=40,leaf_size=30                         0.776050   \n",
       "                             n_neighbors=40,leaf_size=40                         0.776050   \n",
       "                             n_neighbors=30,leaf_size=20                         0.755797   \n",
       "                             n_neighbors=30,leaf_size=30                         0.755797   \n",
       "                             n_neighbors=30,leaf_size=40                         0.755797   \n",
       "                             n_neighbors=20,leaf_size=20                         0.731093   \n",
       "                             n_neighbors=20,leaf_size=30                         0.731093   \n",
       "                             n_neighbors=20,leaf_size=40                         0.731093   \n",
       "                             n_neighbors=10,leaf_size=20                         0.644989   \n",
       "                             n_neighbors=10,leaf_size=30                         0.644989   \n",
       "                             n_neighbors=10,leaf_size=40                         0.644989   \n",
       "                             n_neighbors=5,leaf_size=20                          0.532535   \n",
       "                             n_neighbors=5,leaf_size=30                          0.532535   \n",
       "                             n_neighbors=5,leaf_size=40                          0.532535   \n",
       "Subsequence IF               n_trees=100                                         0.352923   \n",
       "                             n_trees=1000                                        0.366932   \n",
       "                             n_trees=10                                          0.266610   \n",
       "Spectral Residual (SR)       mag_window_size=40,score_window_size=28             0.061042   \n",
       "                             mag_window_size=40,score_window_size=52             0.069676   \n",
       "                             mag_window_size=52,score_window_size=28             0.062067   \n",
       "                             mag_window_size=40,score_window_size=40             0.068046   \n",
       "                             mag_window_size=28,score_window_size=28             0.057827   \n",
       "                             mag_window_size=52,score_window_size=52             0.069872   \n",
       "                             mag_window_size=28,score_window_size=52             0.068115   \n",
       "                             mag_window_size=52,score_window_size=40             0.067572   \n",
       "                             mag_window_size=28,score_window_size=40             0.065526   \n",
       "Random Forest Regressor (RR) train_window_size=500,n_trees=1000                  0.461625   \n",
       "                             train_window_size=500,n_trees=100                   0.460629   \n",
       "                             train_window_size=1000,n_trees=10                   0.486492   \n",
       "                             train_window_size=500,n_trees=10                    0.447524   \n",
       "                             train_window_size=1000,n_trees=100                  0.500050   \n",
       "                             train_window_size=1000,n_trees=1000                 0.500050   \n",
       "                             train_window_size=100,n_trees=10                    0.406361   \n",
       "                             train_window_size=100,n_trees=1000                  0.414861   \n",
       "                             train_window_size=100,n_trees=100                   0.408754   \n",
       "                             train_window_size=50,n_trees=10                     0.430495   \n",
       "                             train_window_size=50,n_trees=1000                   0.440647   \n",
       "                             train_window_size=50,n_trees=100                    0.442055   \n",
       "LaserDBN                     n_bins=10                                           0.123854   \n",
       "                             n_bins=8                                            0.109723   \n",
       "                             n_bins=5                                            0.091819   \n",
       "Hybrid KNN                   n_neighbors=10,n_estimators=1000                    0.500050   \n",
       "                             n_neighbors=5,n_estimators=10                       0.490387   \n",
       "                             n_neighbors=10,n_estimators=10                      0.388155   \n",
       "                             n_neighbors=20,n_estimators=10                      0.325151   \n",
       "                             n_neighbors=30,n_estimators=10                      0.266490   \n",
       "                             n_neighbors=5,n_estimators=100                      0.229072   \n",
       "                             n_neighbors=40,n_estimators=10                      0.262162   \n",
       "                             n_neighbors=50,n_estimators=10                      0.215910   \n",
       "                             n_neighbors=10,n_estimators=100                     0.168860   \n",
       "                             n_neighbors=20,n_estimators=100                     0.111069   \n",
       "                             n_neighbors=30,n_estimators=100                     0.112137   \n",
       "                             n_neighbors=40,n_estimators=100                     0.109536   \n",
       "                             n_neighbors=5,n_estimators=1000                     0.105234   \n",
       "                             n_neighbors=50,n_estimators=100                     0.112258   \n",
       "                             n_neighbors=20,n_estimators=1000                         NaN   \n",
       "                             n_neighbors=30,n_estimators=1000                         NaN   \n",
       "                             n_neighbors=40,n_estimators=1000                         NaN   \n",
       "                             n_neighbors=50,n_estimators=1000                         NaN   \n",
       "FFT                          context_window_size=5                               0.505000   \n",
       "                             context_window_size=10                              0.505000   \n",
       "                             context_window_size=30                              0.505000   \n",
       "                             context_window_size=50                              0.505000   \n",
       "                             context_window_size=40                              0.505000   \n",
       "DeepAnT                      prediction_window_size=50                           0.727927   \n",
       "                             prediction_window_size=1                            0.576116   \n",
       "                             prediction_window_size=5                            0.540302   \n",
       "                             prediction_window_size=10                           0.484113   \n",
       "\n",
       "                                                                                   PR_AUC  \\\n",
       "                                                                                     mean   \n",
       "algorithm                    optim_params                                                   \n",
       "k-Means                      n_clusters=50                                       0.731249   \n",
       "                             n_clusters=10                                       0.631465   \n",
       "                             n_clusters=40                                       0.734723   \n",
       "                             n_clusters=30                                       0.717282   \n",
       "                             n_clusters=5                                        0.506727   \n",
       "XGBoosting (RR)              n_estimators=100,train_window_size=500,n_trees=10   0.576173   \n",
       "                             n_estimators=1000,train_window_size=500,n_trees=10  0.594768   \n",
       "                             n_estimators=100,train_window_size=1000,n_trees=10  0.574269   \n",
       "                             n_estimators=1000,train_window_size=100,n_trees=10  0.541525   \n",
       "                             n_estimators=100,train_window_size=100,n_trees=10   0.538047   \n",
       "                             n_estimators=100,train_window_size=50,n_trees=1000  0.579511   \n",
       "                             n_estimators=100,train_window_size=100,n_trees=100  0.537965   \n",
       "                             n_estimators=1000,train_window_size=50,n_trees=100  0.573416   \n",
       "                             n_estimators=100,train_window_size=500,n_trees=100  0.566107   \n",
       "                             n_estimators=1000,train_window_size=50,n_trees=10   0.535273   \n",
       "                             n_estimators=100,train_window_size=50,n_trees=100   0.526898   \n",
       "                             n_estimators=100,train_window_size=50,n_trees=10    0.526967   \n",
       "                             n_estimators=10,train_window_size=500,n_trees=1000  0.228494   \n",
       "                             n_estimators=10,train_window_size=1000,n_trees=100  0.176832   \n",
       "                             n_estimators=10,train_window_size=1000,n_trees=10   0.176764   \n",
       "                             n_estimators=10,train_window_size=500,n_trees=100   0.172440   \n",
       "                             n_estimators=10,train_window_size=500,n_trees=10    0.172486   \n",
       "                             n_estimators=10,train_window_size=100,n_trees=1000  0.173366   \n",
       "                             n_estimators=10,train_window_size=100,n_trees=100   0.173455   \n",
       "                             n_estimators=10,train_window_size=100,n_trees=10    0.173514   \n",
       "                             n_estimators=10,train_window_size=50,n_trees=10     0.167371   \n",
       "                             n_estimators=10,train_window_size=50,n_trees=1000   0.167410   \n",
       "                             n_estimators=10,train_window_size=50,n_trees=100    0.167461   \n",
       "                             n_estimators=10,train_window_size=1000,n_trees=...       NaN   \n",
       "                             n_estimators=100,train_window_size=100,n_trees=...       NaN   \n",
       "                             n_estimators=100,train_window_size=1000,n_trees...       NaN   \n",
       "                             n_estimators=100,train_window_size=1000,n_trees...       NaN   \n",
       "                             n_estimators=100,train_window_size=500,n_trees=...       NaN   \n",
       "                             n_estimators=1000,train_window_size=100,n_trees...       NaN   \n",
       "                             n_estimators=1000,train_window_size=100,n_trees...       NaN   \n",
       "                             n_estimators=1000,train_window_size=1000,n_tree...       NaN   \n",
       "                             n_estimators=1000,train_window_size=1000,n_tree...       NaN   \n",
       "                             n_estimators=1000,train_window_size=1000,n_tree...       NaN   \n",
       "                             n_estimators=1000,train_window_size=50,n_trees=...       NaN   \n",
       "                             n_estimators=1000,train_window_size=500,n_trees...       NaN   \n",
       "                             n_estimators=1000,train_window_size=500,n_trees...       NaN   \n",
       "Subsequence LOF              n_neighbors=50,leaf_size=20                         0.743959   \n",
       "                             n_neighbors=50,leaf_size=30                         0.743959   \n",
       "                             n_neighbors=50,leaf_size=40                         0.743959   \n",
       "                             n_neighbors=40,leaf_size=20                         0.737149   \n",
       "                             n_neighbors=40,leaf_size=30                         0.737149   \n",
       "                             n_neighbors=40,leaf_size=40                         0.737149   \n",
       "                             n_neighbors=30,leaf_size=20                         0.720621   \n",
       "                             n_neighbors=30,leaf_size=30                         0.720621   \n",
       "                             n_neighbors=30,leaf_size=40                         0.720621   \n",
       "                             n_neighbors=20,leaf_size=20                         0.700981   \n",
       "                             n_neighbors=20,leaf_size=30                         0.700981   \n",
       "                             n_neighbors=20,leaf_size=40                         0.700981   \n",
       "                             n_neighbors=10,leaf_size=20                         0.661217   \n",
       "                             n_neighbors=10,leaf_size=30                         0.661217   \n",
       "                             n_neighbors=10,leaf_size=40                         0.661217   \n",
       "                             n_neighbors=5,leaf_size=20                          0.600370   \n",
       "                             n_neighbors=5,leaf_size=30                          0.600370   \n",
       "                             n_neighbors=5,leaf_size=40                          0.600370   \n",
       "Subsequence IF               n_trees=100                                         0.374519   \n",
       "                             n_trees=1000                                        0.377547   \n",
       "                             n_trees=10                                          0.322275   \n",
       "Spectral Residual (SR)       mag_window_size=40,score_window_size=28             0.135249   \n",
       "                             mag_window_size=40,score_window_size=52             0.137983   \n",
       "                             mag_window_size=52,score_window_size=28             0.136334   \n",
       "                             mag_window_size=40,score_window_size=40             0.135085   \n",
       "                             mag_window_size=28,score_window_size=28             0.131897   \n",
       "                             mag_window_size=52,score_window_size=52             0.138790   \n",
       "                             mag_window_size=28,score_window_size=52             0.135075   \n",
       "                             mag_window_size=52,score_window_size=40             0.135872   \n",
       "                             mag_window_size=28,score_window_size=40             0.132122   \n",
       "Random Forest Regressor (RR) train_window_size=500,n_trees=1000                  0.495439   \n",
       "                             train_window_size=500,n_trees=100                   0.493064   \n",
       "                             train_window_size=1000,n_trees=10                   0.494751   \n",
       "                             train_window_size=500,n_trees=10                    0.484530   \n",
       "                             train_window_size=1000,n_trees=100                  0.504709   \n",
       "                             train_window_size=1000,n_trees=1000                 0.506014   \n",
       "                             train_window_size=100,n_trees=10                    0.446078   \n",
       "                             train_window_size=100,n_trees=1000                  0.450453   \n",
       "                             train_window_size=100,n_trees=100                   0.450511   \n",
       "                             train_window_size=50,n_trees=10                     0.441728   \n",
       "                             train_window_size=50,n_trees=1000                   0.440917   \n",
       "                             train_window_size=50,n_trees=100                    0.440853   \n",
       "LaserDBN                     n_bins=10                                           0.205759   \n",
       "                             n_bins=8                                            0.189396   \n",
       "                             n_bins=5                                            0.156960   \n",
       "Hybrid KNN                   n_neighbors=10,n_estimators=1000                    0.780753   \n",
       "                             n_neighbors=5,n_estimators=10                       0.507717   \n",
       "                             n_neighbors=10,n_estimators=10                      0.445695   \n",
       "                             n_neighbors=20,n_estimators=10                      0.406462   \n",
       "                             n_neighbors=30,n_estimators=10                      0.384227   \n",
       "                             n_neighbors=5,n_estimators=100                      0.377516   \n",
       "                             n_neighbors=40,n_estimators=10                      0.380848   \n",
       "                             n_neighbors=50,n_estimators=10                      0.370661   \n",
       "                             n_neighbors=10,n_estimators=100                     0.241096   \n",
       "                             n_neighbors=20,n_estimators=100                     0.182669   \n",
       "                             n_neighbors=30,n_estimators=100                     0.174245   \n",
       "                             n_neighbors=40,n_estimators=100                     0.156343   \n",
       "                             n_neighbors=5,n_estimators=1000                     0.133322   \n",
       "                             n_neighbors=50,n_estimators=100                     0.128505   \n",
       "                             n_neighbors=20,n_estimators=1000                         NaN   \n",
       "                             n_neighbors=30,n_estimators=1000                         NaN   \n",
       "                             n_neighbors=40,n_estimators=1000                         NaN   \n",
       "                             n_neighbors=50,n_estimators=1000                         NaN   \n",
       "FFT                          context_window_size=5                               0.473597   \n",
       "                             context_window_size=10                              0.453547   \n",
       "                             context_window_size=30                              0.463853   \n",
       "                             context_window_size=50                              0.469732   \n",
       "                             context_window_size=40                              0.446084   \n",
       "DeepAnT                      prediction_window_size=50                           0.650221   \n",
       "                             prediction_window_size=1                            0.569050   \n",
       "                             prediction_window_size=5                            0.520746   \n",
       "                             prediction_window_size=10                           0.462142   \n",
       "\n",
       "                                                                                           \\\n",
       "                                                                                   median   \n",
       "algorithm                    optim_params                                                   \n",
       "k-Means                      n_clusters=50                                       0.907353   \n",
       "                             n_clusters=10                                       0.813824   \n",
       "                             n_clusters=40                                       0.909307   \n",
       "                             n_clusters=30                                       0.900608   \n",
       "                             n_clusters=5                                        0.499666   \n",
       "XGBoosting (RR)              n_estimators=100,train_window_size=500,n_trees=10   0.604537   \n",
       "                             n_estimators=1000,train_window_size=500,n_trees=10  0.640666   \n",
       "                             n_estimators=100,train_window_size=1000,n_trees=10  0.594922   \n",
       "                             n_estimators=1000,train_window_size=100,n_trees=10  0.563024   \n",
       "                             n_estimators=100,train_window_size=100,n_trees=10   0.547702   \n",
       "                             n_estimators=100,train_window_size=50,n_trees=1000  0.641934   \n",
       "                             n_estimators=100,train_window_size=100,n_trees=100  0.549889   \n",
       "                             n_estimators=1000,train_window_size=50,n_trees=100  0.570399   \n",
       "                             n_estimators=100,train_window_size=500,n_trees=100  0.635567   \n",
       "                             n_estimators=1000,train_window_size=50,n_trees=10   0.573212   \n",
       "                             n_estimators=100,train_window_size=50,n_trees=100   0.552242   \n",
       "                             n_estimators=100,train_window_size=50,n_trees=10    0.549307   \n",
       "                             n_estimators=10,train_window_size=500,n_trees=1000  0.142710   \n",
       "                             n_estimators=10,train_window_size=1000,n_trees=100  0.089764   \n",
       "                             n_estimators=10,train_window_size=1000,n_trees=10   0.089833   \n",
       "                             n_estimators=10,train_window_size=500,n_trees=100   0.081960   \n",
       "                             n_estimators=10,train_window_size=500,n_trees=10    0.081960   \n",
       "                             n_estimators=10,train_window_size=100,n_trees=1000  0.089787   \n",
       "                             n_estimators=10,train_window_size=100,n_trees=100   0.093059   \n",
       "                             n_estimators=10,train_window_size=100,n_trees=10    0.093024   \n",
       "                             n_estimators=10,train_window_size=50,n_trees=10     0.078624   \n",
       "                             n_estimators=10,train_window_size=50,n_trees=1000   0.078624   \n",
       "                             n_estimators=10,train_window_size=50,n_trees=100    0.078624   \n",
       "                             n_estimators=10,train_window_size=1000,n_trees=...       NaN   \n",
       "                             n_estimators=100,train_window_size=100,n_trees=...       NaN   \n",
       "                             n_estimators=100,train_window_size=1000,n_trees...       NaN   \n",
       "                             n_estimators=100,train_window_size=1000,n_trees...       NaN   \n",
       "                             n_estimators=100,train_window_size=500,n_trees=...       NaN   \n",
       "                             n_estimators=1000,train_window_size=100,n_trees...       NaN   \n",
       "                             n_estimators=1000,train_window_size=100,n_trees...       NaN   \n",
       "                             n_estimators=1000,train_window_size=1000,n_tree...       NaN   \n",
       "                             n_estimators=1000,train_window_size=1000,n_tree...       NaN   \n",
       "                             n_estimators=1000,train_window_size=1000,n_tree...       NaN   \n",
       "                             n_estimators=1000,train_window_size=50,n_trees=...       NaN   \n",
       "                             n_estimators=1000,train_window_size=500,n_trees...       NaN   \n",
       "                             n_estimators=1000,train_window_size=500,n_trees...       NaN   \n",
       "Subsequence LOF              n_neighbors=50,leaf_size=20                         0.882092   \n",
       "                             n_neighbors=50,leaf_size=30                         0.882092   \n",
       "                             n_neighbors=50,leaf_size=40                         0.882092   \n",
       "                             n_neighbors=40,leaf_size=20                         0.873213   \n",
       "                             n_neighbors=40,leaf_size=30                         0.873213   \n",
       "                             n_neighbors=40,leaf_size=40                         0.873213   \n",
       "                             n_neighbors=30,leaf_size=20                         0.870822   \n",
       "                             n_neighbors=30,leaf_size=30                         0.870822   \n",
       "                             n_neighbors=30,leaf_size=40                         0.870822   \n",
       "                             n_neighbors=20,leaf_size=20                         0.838854   \n",
       "                             n_neighbors=20,leaf_size=30                         0.838854   \n",
       "                             n_neighbors=20,leaf_size=40                         0.838854   \n",
       "                             n_neighbors=10,leaf_size=20                         0.736382   \n",
       "                             n_neighbors=10,leaf_size=30                         0.736382   \n",
       "                             n_neighbors=10,leaf_size=40                         0.736382   \n",
       "                             n_neighbors=5,leaf_size=20                          0.601895   \n",
       "                             n_neighbors=5,leaf_size=30                          0.601895   \n",
       "                             n_neighbors=5,leaf_size=40                          0.601895   \n",
       "Subsequence IF               n_trees=100                                         0.189624   \n",
       "                             n_trees=1000                                        0.194410   \n",
       "                             n_trees=10                                          0.121945   \n",
       "Spectral Residual (SR)       mag_window_size=40,score_window_size=28             0.054243   \n",
       "                             mag_window_size=40,score_window_size=52             0.063120   \n",
       "                             mag_window_size=52,score_window_size=28             0.055456   \n",
       "                             mag_window_size=40,score_window_size=40             0.060187   \n",
       "                             mag_window_size=28,score_window_size=28             0.052179   \n",
       "                             mag_window_size=52,score_window_size=52             0.063183   \n",
       "                             mag_window_size=28,score_window_size=52             0.061975   \n",
       "                             mag_window_size=52,score_window_size=40             0.060770   \n",
       "                             mag_window_size=28,score_window_size=40             0.059424   \n",
       "Random Forest Regressor (RR) train_window_size=500,n_trees=1000                  0.471786   \n",
       "                             train_window_size=500,n_trees=100                   0.466347   \n",
       "                             train_window_size=1000,n_trees=10                   0.486030   \n",
       "                             train_window_size=500,n_trees=10                    0.446820   \n",
       "                             train_window_size=1000,n_trees=100                  0.487527   \n",
       "                             train_window_size=1000,n_trees=1000                 0.495471   \n",
       "                             train_window_size=100,n_trees=10                    0.374018   \n",
       "                             train_window_size=100,n_trees=1000                  0.383125   \n",
       "                             train_window_size=100,n_trees=100                   0.399304   \n",
       "                             train_window_size=50,n_trees=10                     0.388733   \n",
       "                             train_window_size=50,n_trees=1000                   0.389314   \n",
       "                             train_window_size=50,n_trees=100                    0.388945   \n",
       "LaserDBN                     n_bins=10                                           0.120415   \n",
       "                             n_bins=8                                            0.086610   \n",
       "                             n_bins=5                                            0.078112   \n",
       "Hybrid KNN                   n_neighbors=10,n_estimators=1000                    1.000000   \n",
       "                             n_neighbors=5,n_estimators=10                       0.525154   \n",
       "                             n_neighbors=10,n_estimators=10                      0.281308   \n",
       "                             n_neighbors=20,n_estimators=10                      0.108193   \n",
       "                             n_neighbors=30,n_estimators=10                      0.075083   \n",
       "                             n_neighbors=5,n_estimators=100                      0.081873   \n",
       "                             n_neighbors=40,n_estimators=10                      0.068915   \n",
       "                             n_neighbors=50,n_estimators=10                      0.063267   \n",
       "                             n_neighbors=10,n_estimators=100                     0.030151   \n",
       "                             n_neighbors=20,n_estimators=100                     0.020579   \n",
       "                             n_neighbors=30,n_estimators=100                     0.019158   \n",
       "                             n_neighbors=40,n_estimators=100                     0.015419   \n",
       "                             n_neighbors=5,n_estimators=1000                     0.014671   \n",
       "                             n_neighbors=50,n_estimators=100                     0.014389   \n",
       "                             n_neighbors=20,n_estimators=1000                         NaN   \n",
       "                             n_neighbors=30,n_estimators=1000                         NaN   \n",
       "                             n_neighbors=40,n_estimators=1000                         NaN   \n",
       "                             n_neighbors=50,n_estimators=1000                         NaN   \n",
       "FFT                          context_window_size=5                               0.505000   \n",
       "                             context_window_size=10                              0.505000   \n",
       "                             context_window_size=30                              0.505000   \n",
       "                             context_window_size=50                              0.505000   \n",
       "                             context_window_size=40                              0.505000   \n",
       "DeepAnT                      prediction_window_size=50                           0.828401   \n",
       "                             prediction_window_size=1                            0.650143   \n",
       "                             prediction_window_size=5                            0.581242   \n",
       "                             prediction_window_size=10                           0.397351   \n",
       "\n",
       "                                                                                  ROC_AUC  \\\n",
       "                                                                                     mean   \n",
       "algorithm                    optim_params                                                   \n",
       "k-Means                      n_clusters=50                                       0.906015   \n",
       "                             n_clusters=10                                       0.900291   \n",
       "                             n_clusters=40                                       0.897863   \n",
       "                             n_clusters=30                                       0.888424   \n",
       "                             n_clusters=5                                        0.799891   \n",
       "XGBoosting (RR)              n_estimators=100,train_window_size=500,n_trees=10   0.875130   \n",
       "                             n_estimators=1000,train_window_size=500,n_trees=10  0.875129   \n",
       "                             n_estimators=100,train_window_size=1000,n_trees=10  0.864566   \n",
       "                             n_estimators=1000,train_window_size=100,n_trees=10  0.863497   \n",
       "                             n_estimators=100,train_window_size=100,n_trees=10   0.858239   \n",
       "                             n_estimators=100,train_window_size=50,n_trees=1000  0.857872   \n",
       "                             n_estimators=100,train_window_size=100,n_trees=100  0.857850   \n",
       "                             n_estimators=1000,train_window_size=50,n_trees=100  0.850897   \n",
       "                             n_estimators=100,train_window_size=500,n_trees=100  0.839347   \n",
       "                             n_estimators=1000,train_window_size=50,n_trees=10   0.836716   \n",
       "                             n_estimators=100,train_window_size=50,n_trees=100   0.830433   \n",
       "                             n_estimators=100,train_window_size=50,n_trees=10    0.829750   \n",
       "                             n_estimators=10,train_window_size=500,n_trees=1000  0.673216   \n",
       "                             n_estimators=10,train_window_size=1000,n_trees=100  0.617297   \n",
       "                             n_estimators=10,train_window_size=1000,n_trees=10   0.617170   \n",
       "                             n_estimators=10,train_window_size=500,n_trees=100   0.601369   \n",
       "                             n_estimators=10,train_window_size=500,n_trees=10    0.601317   \n",
       "                             n_estimators=10,train_window_size=100,n_trees=1000  0.582695   \n",
       "                             n_estimators=10,train_window_size=100,n_trees=100   0.582505   \n",
       "                             n_estimators=10,train_window_size=100,n_trees=10    0.582463   \n",
       "                             n_estimators=10,train_window_size=50,n_trees=10     0.576051   \n",
       "                             n_estimators=10,train_window_size=50,n_trees=1000   0.575939   \n",
       "                             n_estimators=10,train_window_size=50,n_trees=100    0.575928   \n",
       "                             n_estimators=10,train_window_size=1000,n_trees=...       NaN   \n",
       "                             n_estimators=100,train_window_size=100,n_trees=...       NaN   \n",
       "                             n_estimators=100,train_window_size=1000,n_trees...       NaN   \n",
       "                             n_estimators=100,train_window_size=1000,n_trees...       NaN   \n",
       "                             n_estimators=100,train_window_size=500,n_trees=...       NaN   \n",
       "                             n_estimators=1000,train_window_size=100,n_trees...       NaN   \n",
       "                             n_estimators=1000,train_window_size=100,n_trees...       NaN   \n",
       "                             n_estimators=1000,train_window_size=1000,n_tree...       NaN   \n",
       "                             n_estimators=1000,train_window_size=1000,n_tree...       NaN   \n",
       "                             n_estimators=1000,train_window_size=1000,n_tree...       NaN   \n",
       "                             n_estimators=1000,train_window_size=50,n_trees=...       NaN   \n",
       "                             n_estimators=1000,train_window_size=500,n_trees...       NaN   \n",
       "                             n_estimators=1000,train_window_size=500,n_trees...       NaN   \n",
       "Subsequence LOF              n_neighbors=50,leaf_size=20                         0.952246   \n",
       "                             n_neighbors=50,leaf_size=30                         0.952246   \n",
       "                             n_neighbors=50,leaf_size=40                         0.952246   \n",
       "                             n_neighbors=40,leaf_size=20                         0.947352   \n",
       "                             n_neighbors=40,leaf_size=30                         0.947352   \n",
       "                             n_neighbors=40,leaf_size=40                         0.947352   \n",
       "                             n_neighbors=30,leaf_size=20                         0.937379   \n",
       "                             n_neighbors=30,leaf_size=30                         0.937379   \n",
       "                             n_neighbors=30,leaf_size=40                         0.937379   \n",
       "                             n_neighbors=20,leaf_size=20                         0.922816   \n",
       "                             n_neighbors=20,leaf_size=30                         0.922816   \n",
       "                             n_neighbors=20,leaf_size=40                         0.922816   \n",
       "                             n_neighbors=10,leaf_size=20                         0.893642   \n",
       "                             n_neighbors=10,leaf_size=30                         0.893642   \n",
       "                             n_neighbors=10,leaf_size=40                         0.893642   \n",
       "                             n_neighbors=5,leaf_size=20                          0.848374   \n",
       "                             n_neighbors=5,leaf_size=30                          0.848374   \n",
       "                             n_neighbors=5,leaf_size=40                          0.848374   \n",
       "Subsequence IF               n_trees=100                                         0.780814   \n",
       "                             n_trees=1000                                        0.779641   \n",
       "                             n_trees=10                                          0.765512   \n",
       "Spectral Residual (SR)       mag_window_size=40,score_window_size=28             0.562939   \n",
       "                             mag_window_size=40,score_window_size=52             0.562544   \n",
       "                             mag_window_size=52,score_window_size=28             0.562416   \n",
       "                             mag_window_size=40,score_window_size=40             0.562241   \n",
       "                             mag_window_size=28,score_window_size=28             0.562035   \n",
       "                             mag_window_size=52,score_window_size=52             0.561934   \n",
       "                             mag_window_size=28,score_window_size=52             0.561832   \n",
       "                             mag_window_size=52,score_window_size=40             0.561516   \n",
       "                             mag_window_size=28,score_window_size=40             0.561368   \n",
       "Random Forest Regressor (RR) train_window_size=500,n_trees=1000                  0.830238   \n",
       "                             train_window_size=500,n_trees=100                   0.828904   \n",
       "                             train_window_size=1000,n_trees=10                   0.826954   \n",
       "                             train_window_size=500,n_trees=10                    0.826419   \n",
       "                             train_window_size=1000,n_trees=100                  0.825949   \n",
       "                             train_window_size=1000,n_trees=1000                 0.825707   \n",
       "                             train_window_size=100,n_trees=10                    0.814787   \n",
       "                             train_window_size=100,n_trees=1000                  0.814687   \n",
       "                             train_window_size=100,n_trees=100                   0.813792   \n",
       "                             train_window_size=50,n_trees=10                     0.789990   \n",
       "                             train_window_size=50,n_trees=1000                   0.789582   \n",
       "                             train_window_size=50,n_trees=100                    0.789471   \n",
       "LaserDBN                     n_bins=10                                           0.651637   \n",
       "                             n_bins=8                                            0.628754   \n",
       "                             n_bins=5                                            0.587310   \n",
       "Hybrid KNN                   n_neighbors=10,n_estimators=1000                    0.997410   \n",
       "                             n_neighbors=5,n_estimators=10                       0.871120   \n",
       "                             n_neighbors=10,n_estimators=10                      0.820675   \n",
       "                             n_neighbors=20,n_estimators=10                      0.761696   \n",
       "                             n_neighbors=30,n_estimators=10                      0.716320   \n",
       "                             n_neighbors=5,n_estimators=100                      0.700463   \n",
       "                             n_neighbors=40,n_estimators=10                      0.699504   \n",
       "                             n_neighbors=50,n_estimators=10                      0.695780   \n",
       "                             n_neighbors=10,n_estimators=100                     0.542939   \n",
       "                             n_neighbors=20,n_estimators=100                     0.483084   \n",
       "                             n_neighbors=30,n_estimators=100                     0.466031   \n",
       "                             n_neighbors=40,n_estimators=100                     0.444610   \n",
       "                             n_neighbors=5,n_estimators=1000                     0.423783   \n",
       "                             n_neighbors=50,n_estimators=100                     0.405481   \n",
       "                             n_neighbors=20,n_estimators=1000                         NaN   \n",
       "                             n_neighbors=30,n_estimators=1000                         NaN   \n",
       "                             n_neighbors=40,n_estimators=1000                         NaN   \n",
       "                             n_neighbors=50,n_estimators=1000                         NaN   \n",
       "FFT                          context_window_size=5                               0.642093   \n",
       "                             context_window_size=10                              0.632059   \n",
       "                             context_window_size=30                              0.627192   \n",
       "                             context_window_size=50                              0.618787   \n",
       "                             context_window_size=40                              0.618658   \n",
       "DeepAnT                      prediction_window_size=50                           0.887537   \n",
       "                             prediction_window_size=1                            0.865365   \n",
       "                             prediction_window_size=5                            0.781450   \n",
       "                             prediction_window_size=10                           0.722039   \n",
       "\n",
       "                                                                                           \\\n",
       "                                                                                   median   \n",
       "algorithm                    optim_params                                                   \n",
       "k-Means                      n_clusters=50                                       0.998755   \n",
       "                             n_clusters=10                                       0.995966   \n",
       "                             n_clusters=40                                       0.998609   \n",
       "                             n_clusters=30                                       0.998733   \n",
       "                             n_clusters=5                                        0.969181   \n",
       "XGBoosting (RR)              n_estimators=100,train_window_size=500,n_trees=10   0.895263   \n",
       "                             n_estimators=1000,train_window_size=500,n_trees=10  0.893394   \n",
       "                             n_estimators=100,train_window_size=1000,n_trees=10  0.886992   \n",
       "                             n_estimators=1000,train_window_size=100,n_trees=10  0.878400   \n",
       "                             n_estimators=100,train_window_size=100,n_trees=10   0.879929   \n",
       "                             n_estimators=100,train_window_size=50,n_trees=1000  0.853390   \n",
       "                             n_estimators=100,train_window_size=100,n_trees=100  0.877791   \n",
       "                             n_estimators=1000,train_window_size=50,n_trees=100  0.871132   \n",
       "                             n_estimators=100,train_window_size=500,n_trees=100  0.894931   \n",
       "                             n_estimators=1000,train_window_size=50,n_trees=10   0.866733   \n",
       "                             n_estimators=100,train_window_size=50,n_trees=100   0.866575   \n",
       "                             n_estimators=100,train_window_size=50,n_trees=10    0.861499   \n",
       "                             n_estimators=10,train_window_size=500,n_trees=1000  0.620912   \n",
       "                             n_estimators=10,train_window_size=1000,n_trees=100  0.610721   \n",
       "                             n_estimators=10,train_window_size=1000,n_trees=10   0.610704   \n",
       "                             n_estimators=10,train_window_size=500,n_trees=100   0.593624   \n",
       "                             n_estimators=10,train_window_size=500,n_trees=10    0.593625   \n",
       "                             n_estimators=10,train_window_size=100,n_trees=1000  0.572823   \n",
       "                             n_estimators=10,train_window_size=100,n_trees=100   0.568211   \n",
       "                             n_estimators=10,train_window_size=100,n_trees=10    0.568211   \n",
       "                             n_estimators=10,train_window_size=50,n_trees=10     0.560544   \n",
       "                             n_estimators=10,train_window_size=50,n_trees=1000   0.560551   \n",
       "                             n_estimators=10,train_window_size=50,n_trees=100    0.560543   \n",
       "                             n_estimators=10,train_window_size=1000,n_trees=...       NaN   \n",
       "                             n_estimators=100,train_window_size=100,n_trees=...       NaN   \n",
       "                             n_estimators=100,train_window_size=1000,n_trees...       NaN   \n",
       "                             n_estimators=100,train_window_size=1000,n_trees...       NaN   \n",
       "                             n_estimators=100,train_window_size=500,n_trees=...       NaN   \n",
       "                             n_estimators=1000,train_window_size=100,n_trees...       NaN   \n",
       "                             n_estimators=1000,train_window_size=100,n_trees...       NaN   \n",
       "                             n_estimators=1000,train_window_size=1000,n_tree...       NaN   \n",
       "                             n_estimators=1000,train_window_size=1000,n_tree...       NaN   \n",
       "                             n_estimators=1000,train_window_size=1000,n_tree...       NaN   \n",
       "                             n_estimators=1000,train_window_size=50,n_trees=...       NaN   \n",
       "                             n_estimators=1000,train_window_size=500,n_trees...       NaN   \n",
       "                             n_estimators=1000,train_window_size=500,n_trees...       NaN   \n",
       "Subsequence LOF              n_neighbors=50,leaf_size=20                         0.997405   \n",
       "                             n_neighbors=50,leaf_size=30                         0.997405   \n",
       "                             n_neighbors=50,leaf_size=40                         0.997405   \n",
       "                             n_neighbors=40,leaf_size=20                         0.996979   \n",
       "                             n_neighbors=40,leaf_size=30                         0.996979   \n",
       "                             n_neighbors=40,leaf_size=40                         0.996979   \n",
       "                             n_neighbors=30,leaf_size=20                         0.996399   \n",
       "                             n_neighbors=30,leaf_size=30                         0.996399   \n",
       "                             n_neighbors=30,leaf_size=40                         0.996399   \n",
       "                             n_neighbors=20,leaf_size=20                         0.995913   \n",
       "                             n_neighbors=20,leaf_size=30                         0.995913   \n",
       "                             n_neighbors=20,leaf_size=40                         0.995913   \n",
       "                             n_neighbors=10,leaf_size=20                         0.992956   \n",
       "                             n_neighbors=10,leaf_size=30                         0.992956   \n",
       "                             n_neighbors=10,leaf_size=40                         0.992956   \n",
       "                             n_neighbors=5,leaf_size=20                          0.974317   \n",
       "                             n_neighbors=5,leaf_size=30                          0.974317   \n",
       "                             n_neighbors=5,leaf_size=40                          0.974317   \n",
       "Subsequence IF               n_trees=100                                         0.851420   \n",
       "                             n_trees=1000                                        0.862844   \n",
       "                             n_trees=10                                          0.831879   \n",
       "Spectral Residual (SR)       mag_window_size=40,score_window_size=28             0.535750   \n",
       "                             mag_window_size=40,score_window_size=52             0.537469   \n",
       "                             mag_window_size=52,score_window_size=28             0.534901   \n",
       "                             mag_window_size=40,score_window_size=40             0.536813   \n",
       "                             mag_window_size=28,score_window_size=28             0.535935   \n",
       "                             mag_window_size=52,score_window_size=52             0.537469   \n",
       "                             mag_window_size=28,score_window_size=52             0.537469   \n",
       "                             mag_window_size=52,score_window_size=40             0.535370   \n",
       "                             mag_window_size=28,score_window_size=40             0.537415   \n",
       "Random Forest Regressor (RR) train_window_size=500,n_trees=1000                  0.852303   \n",
       "                             train_window_size=500,n_trees=100                   0.850691   \n",
       "                             train_window_size=1000,n_trees=10                   0.853791   \n",
       "                             train_window_size=500,n_trees=10                    0.841489   \n",
       "                             train_window_size=1000,n_trees=100                  0.853423   \n",
       "                             train_window_size=1000,n_trees=1000                 0.852895   \n",
       "                             train_window_size=100,n_trees=10                    0.819364   \n",
       "                             train_window_size=100,n_trees=1000                  0.831395   \n",
       "                             train_window_size=100,n_trees=100                   0.829483   \n",
       "                             train_window_size=50,n_trees=10                     0.821722   \n",
       "                             train_window_size=50,n_trees=1000                   0.827747   \n",
       "                             train_window_size=50,n_trees=100                    0.825072   \n",
       "LaserDBN                     n_bins=10                                           0.653969   \n",
       "                             n_bins=8                                            0.608466   \n",
       "                             n_bins=5                                            0.557852   \n",
       "Hybrid KNN                   n_neighbors=10,n_estimators=1000                    1.000000   \n",
       "                             n_neighbors=5,n_estimators=10                       0.972022   \n",
       "                             n_neighbors=10,n_estimators=10                      0.924911   \n",
       "                             n_neighbors=20,n_estimators=10                      0.840679   \n",
       "                             n_neighbors=30,n_estimators=10                      0.802893   \n",
       "                             n_neighbors=5,n_estimators=100                      0.808382   \n",
       "                             n_neighbors=40,n_estimators=10                      0.810781   \n",
       "                             n_neighbors=50,n_estimators=10                      0.803726   \n",
       "                             n_neighbors=10,n_estimators=100                     0.613657   \n",
       "                             n_neighbors=20,n_estimators=100                     0.430480   \n",
       "                             n_neighbors=30,n_estimators=100                     0.433788   \n",
       "                             n_neighbors=40,n_estimators=100                     0.404847   \n",
       "                             n_neighbors=5,n_estimators=1000                     0.386913   \n",
       "                             n_neighbors=50,n_estimators=100                     0.363171   \n",
       "                             n_neighbors=20,n_estimators=1000                         NaN   \n",
       "                             n_neighbors=30,n_estimators=1000                         NaN   \n",
       "                             n_neighbors=40,n_estimators=1000                         NaN   \n",
       "                             n_neighbors=50,n_estimators=1000                         NaN   \n",
       "FFT                          context_window_size=5                               0.560266   \n",
       "                             context_window_size=10                              0.541255   \n",
       "                             context_window_size=30                              0.559394   \n",
       "                             context_window_size=50                              0.531680   \n",
       "                             context_window_size=40                              0.539432   \n",
       "DeepAnT                      prediction_window_size=50                           0.996496   \n",
       "                             prediction_window_size=1                            0.991559   \n",
       "                             prediction_window_size=5                            0.988733   \n",
       "                             prediction_window_size=10                           0.977391   \n",
       "\n",
       "                                                                                train_main_time  \\\n",
       "                                                                                           mean   \n",
       "algorithm                    optim_params                                                         \n",
       "k-Means                      n_clusters=50                                                  NaN   \n",
       "                             n_clusters=10                                                  NaN   \n",
       "                             n_clusters=40                                                  NaN   \n",
       "                             n_clusters=30                                                  NaN   \n",
       "                             n_clusters=5                                                   NaN   \n",
       "XGBoosting (RR)              n_estimators=100,train_window_size=500,n_trees=10       759.508304   \n",
       "                             n_estimators=1000,train_window_size=500,n_trees=10     6321.226583   \n",
       "                             n_estimators=100,train_window_size=1000,n_trees=10     1464.654062   \n",
       "                             n_estimators=1000,train_window_size=100,n_trees=10     1573.372765   \n",
       "                             n_estimators=100,train_window_size=100,n_trees=10       169.182106   \n",
       "                             n_estimators=100,train_window_size=50,n_trees=1000     6592.027692   \n",
       "                             n_estimators=100,train_window_size=100,n_trees=100     1632.339777   \n",
       "                             n_estimators=1000,train_window_size=50,n_trees=100     5952.980637   \n",
       "                             n_estimators=100,train_window_size=500,n_trees=100     6279.308873   \n",
       "                             n_estimators=1000,train_window_size=50,n_trees=10       789.579509   \n",
       "                             n_estimators=100,train_window_size=50,n_trees=100       823.751375   \n",
       "                             n_estimators=100,train_window_size=50,n_trees=10         89.030824   \n",
       "                             n_estimators=10,train_window_size=500,n_trees=1000     6272.249137   \n",
       "                             n_estimators=10,train_window_size=1000,n_trees=100     1451.360779   \n",
       "                             n_estimators=10,train_window_size=1000,n_trees=10       153.756991   \n",
       "                             n_estimators=10,train_window_size=500,n_trees=100       765.019769   \n",
       "                             n_estimators=10,train_window_size=500,n_trees=10         82.872935   \n",
       "                             n_estimators=10,train_window_size=100,n_trees=1000     1615.638221   \n",
       "                             n_estimators=10,train_window_size=100,n_trees=100       167.877371   \n",
       "                             n_estimators=10,train_window_size=100,n_trees=10         21.867478   \n",
       "                             n_estimators=10,train_window_size=50,n_trees=10          14.024271   \n",
       "                             n_estimators=10,train_window_size=50,n_trees=1000       809.931573   \n",
       "                             n_estimators=10,train_window_size=50,n_trees=100         86.318694   \n",
       "                             n_estimators=10,train_window_size=1000,n_trees=...             NaN   \n",
       "                             n_estimators=100,train_window_size=100,n_trees=...             NaN   \n",
       "                             n_estimators=100,train_window_size=1000,n_trees...             NaN   \n",
       "                             n_estimators=100,train_window_size=1000,n_trees...             NaN   \n",
       "                             n_estimators=100,train_window_size=500,n_trees=...             NaN   \n",
       "                             n_estimators=1000,train_window_size=100,n_trees...             NaN   \n",
       "                             n_estimators=1000,train_window_size=100,n_trees...             NaN   \n",
       "                             n_estimators=1000,train_window_size=1000,n_tree...             NaN   \n",
       "                             n_estimators=1000,train_window_size=1000,n_tree...             NaN   \n",
       "                             n_estimators=1000,train_window_size=1000,n_tree...             NaN   \n",
       "                             n_estimators=1000,train_window_size=50,n_trees=...             NaN   \n",
       "                             n_estimators=1000,train_window_size=500,n_trees...             NaN   \n",
       "                             n_estimators=1000,train_window_size=500,n_trees...             NaN   \n",
       "Subsequence LOF              n_neighbors=50,leaf_size=20                                    NaN   \n",
       "                             n_neighbors=50,leaf_size=30                                    NaN   \n",
       "                             n_neighbors=50,leaf_size=40                                    NaN   \n",
       "                             n_neighbors=40,leaf_size=20                                    NaN   \n",
       "                             n_neighbors=40,leaf_size=30                                    NaN   \n",
       "                             n_neighbors=40,leaf_size=40                                    NaN   \n",
       "                             n_neighbors=30,leaf_size=20                                    NaN   \n",
       "                             n_neighbors=30,leaf_size=30                                    NaN   \n",
       "                             n_neighbors=30,leaf_size=40                                    NaN   \n",
       "                             n_neighbors=20,leaf_size=20                                    NaN   \n",
       "                             n_neighbors=20,leaf_size=30                                    NaN   \n",
       "                             n_neighbors=20,leaf_size=40                                    NaN   \n",
       "                             n_neighbors=10,leaf_size=20                                    NaN   \n",
       "                             n_neighbors=10,leaf_size=30                                    NaN   \n",
       "                             n_neighbors=10,leaf_size=40                                    NaN   \n",
       "                             n_neighbors=5,leaf_size=20                                     NaN   \n",
       "                             n_neighbors=5,leaf_size=30                                     NaN   \n",
       "                             n_neighbors=5,leaf_size=40                                     NaN   \n",
       "Subsequence IF               n_trees=100                                                    NaN   \n",
       "                             n_trees=1000                                                   NaN   \n",
       "                             n_trees=10                                                     NaN   \n",
       "Spectral Residual (SR)       mag_window_size=40,score_window_size=28                        NaN   \n",
       "                             mag_window_size=40,score_window_size=52                        NaN   \n",
       "                             mag_window_size=52,score_window_size=28                        NaN   \n",
       "                             mag_window_size=40,score_window_size=40                        NaN   \n",
       "                             mag_window_size=28,score_window_size=28                        NaN   \n",
       "                             mag_window_size=52,score_window_size=52                        NaN   \n",
       "                             mag_window_size=28,score_window_size=52                        NaN   \n",
       "                             mag_window_size=52,score_window_size=40                        NaN   \n",
       "                             mag_window_size=28,score_window_size=40                        NaN   \n",
       "Random Forest Regressor (RR) train_window_size=500,n_trees=1000                     1327.517207   \n",
       "                             train_window_size=500,n_trees=100                       140.833740   \n",
       "                             train_window_size=1000,n_trees=10                        32.646585   \n",
       "                             train_window_size=500,n_trees=10                         20.227891   \n",
       "                             train_window_size=1000,n_trees=100                      258.947684   \n",
       "                             train_window_size=1000,n_trees=1000                    2534.804197   \n",
       "                             train_window_size=100,n_trees=10                          9.429778   \n",
       "                             train_window_size=100,n_trees=1000                      283.689249   \n",
       "                             train_window_size=100,n_trees=100                        34.904676   \n",
       "                             train_window_size=50,n_trees=10                           8.228891   \n",
       "                             train_window_size=50,n_trees=1000                       148.225063   \n",
       "                             train_window_size=50,n_trees=100                         20.999152   \n",
       "LaserDBN                     n_bins=10                                                 6.195011   \n",
       "                             n_bins=8                                                  6.315164   \n",
       "                             n_bins=5                                                  6.281771   \n",
       "Hybrid KNN                   n_neighbors=10,n_estimators=1000                       4628.189503   \n",
       "                             n_neighbors=5,n_estimators=10                           344.385514   \n",
       "                             n_neighbors=10,n_estimators=10                          416.534920   \n",
       "                             n_neighbors=20,n_estimators=10                          408.336870   \n",
       "                             n_neighbors=30,n_estimators=10                          416.986133   \n",
       "                             n_neighbors=5,n_estimators=100                          429.932958   \n",
       "                             n_neighbors=40,n_estimators=10                          457.649137   \n",
       "                             n_neighbors=50,n_estimators=10                          401.712861   \n",
       "                             n_neighbors=10,n_estimators=100                         512.750938   \n",
       "                             n_neighbors=20,n_estimators=100                         536.211796   \n",
       "                             n_neighbors=30,n_estimators=100                         473.031279   \n",
       "                             n_neighbors=40,n_estimators=100                         510.991568   \n",
       "                             n_neighbors=5,n_estimators=1000                        3113.433991   \n",
       "                             n_neighbors=50,n_estimators=100                         519.436985   \n",
       "                             n_neighbors=20,n_estimators=1000                               NaN   \n",
       "                             n_neighbors=30,n_estimators=1000                               NaN   \n",
       "                             n_neighbors=40,n_estimators=1000                               NaN   \n",
       "                             n_neighbors=50,n_estimators=1000                               NaN   \n",
       "FFT                          context_window_size=5                                          NaN   \n",
       "                             context_window_size=10                                         NaN   \n",
       "                             context_window_size=30                                         NaN   \n",
       "                             context_window_size=50                                         NaN   \n",
       "                             context_window_size=40                                         NaN   \n",
       "DeepAnT                      prediction_window_size=50                              3989.792651   \n",
       "                             prediction_window_size=1                               3987.373678   \n",
       "                             prediction_window_size=5                               4060.859754   \n",
       "                             prediction_window_size=10                              3935.055738   \n",
       "\n",
       "                                                                                execute_main_time  \\\n",
       "                                                                                             mean   \n",
       "algorithm                    optim_params                                                           \n",
       "k-Means                      n_clusters=50                                             110.274954   \n",
       "                             n_clusters=10                                              22.872482   \n",
       "                             n_clusters=40                                              91.804415   \n",
       "                             n_clusters=30                                              56.707882   \n",
       "                             n_clusters=5                                               15.024977   \n",
       "XGBoosting (RR)              n_estimators=100,train_window_size=500,n_trees=10           6.007331   \n",
       "                             n_estimators=1000,train_window_size=500,n_trees=10          7.495866   \n",
       "                             n_estimators=100,train_window_size=1000,n_trees=10          6.364846   \n",
       "                             n_estimators=1000,train_window_size=100,n_trees=10          9.030304   \n",
       "                             n_estimators=100,train_window_size=100,n_trees=10           6.132443   \n",
       "                             n_estimators=100,train_window_size=50,n_trees=1000         30.459804   \n",
       "                             n_estimators=100,train_window_size=100,n_trees=100          9.164321   \n",
       "                             n_estimators=1000,train_window_size=50,n_trees=100         27.112379   \n",
       "                             n_estimators=100,train_window_size=500,n_trees=100          6.914177   \n",
       "                             n_estimators=1000,train_window_size=50,n_trees=10           8.693578   \n",
       "                             n_estimators=100,train_window_size=50,n_trees=100           8.768884   \n",
       "                             n_estimators=100,train_window_size=50,n_trees=10            6.234096   \n",
       "                             n_estimators=10,train_window_size=500,n_trees=1000          6.856892   \n",
       "                             n_estimators=10,train_window_size=1000,n_trees=100          6.411457   \n",
       "                             n_estimators=10,train_window_size=1000,n_trees=10           5.987072   \n",
       "                             n_estimators=10,train_window_size=500,n_trees=100           6.105588   \n",
       "                             n_estimators=10,train_window_size=500,n_trees=10            5.698693   \n",
       "                             n_estimators=10,train_window_size=100,n_trees=1000          8.856995   \n",
       "                             n_estimators=10,train_window_size=100,n_trees=100           6.022906   \n",
       "                             n_estimators=10,train_window_size=100,n_trees=10            5.839729   \n",
       "                             n_estimators=10,train_window_size=50,n_trees=10             5.856473   \n",
       "                             n_estimators=10,train_window_size=50,n_trees=1000           8.679434   \n",
       "                             n_estimators=10,train_window_size=50,n_trees=100            5.868259   \n",
       "                             n_estimators=10,train_window_size=1000,n_trees=...               NaN   \n",
       "                             n_estimators=100,train_window_size=100,n_trees=...               NaN   \n",
       "                             n_estimators=100,train_window_size=1000,n_trees...               NaN   \n",
       "                             n_estimators=100,train_window_size=1000,n_trees...               NaN   \n",
       "                             n_estimators=100,train_window_size=500,n_trees=...               NaN   \n",
       "                             n_estimators=1000,train_window_size=100,n_trees...               NaN   \n",
       "                             n_estimators=1000,train_window_size=100,n_trees...               NaN   \n",
       "                             n_estimators=1000,train_window_size=1000,n_tree...               NaN   \n",
       "                             n_estimators=1000,train_window_size=1000,n_tree...               NaN   \n",
       "                             n_estimators=1000,train_window_size=1000,n_tree...               NaN   \n",
       "                             n_estimators=1000,train_window_size=50,n_trees=...               NaN   \n",
       "                             n_estimators=1000,train_window_size=500,n_trees...               NaN   \n",
       "                             n_estimators=1000,train_window_size=500,n_trees...               NaN   \n",
       "Subsequence LOF              n_neighbors=50,leaf_size=20                                17.370683   \n",
       "                             n_neighbors=50,leaf_size=30                                17.489975   \n",
       "                             n_neighbors=50,leaf_size=40                                17.376043   \n",
       "                             n_neighbors=40,leaf_size=20                                17.605290   \n",
       "                             n_neighbors=40,leaf_size=30                                17.293120   \n",
       "                             n_neighbors=40,leaf_size=40                                17.339382   \n",
       "                             n_neighbors=30,leaf_size=20                                17.448414   \n",
       "                             n_neighbors=30,leaf_size=30                                17.350395   \n",
       "                             n_neighbors=30,leaf_size=40                                17.279908   \n",
       "                             n_neighbors=20,leaf_size=20                                17.454309   \n",
       "                             n_neighbors=20,leaf_size=30                                17.489518   \n",
       "                             n_neighbors=20,leaf_size=40                                17.506022   \n",
       "                             n_neighbors=10,leaf_size=20                                17.429065   \n",
       "                             n_neighbors=10,leaf_size=30                                17.360684   \n",
       "                             n_neighbors=10,leaf_size=40                                17.347841   \n",
       "                             n_neighbors=5,leaf_size=20                                 17.352823   \n",
       "                             n_neighbors=5,leaf_size=30                                 17.485450   \n",
       "                             n_neighbors=5,leaf_size=40                                 17.244517   \n",
       "Subsequence IF               n_trees=100                                                 8.530546   \n",
       "                             n_trees=1000                                               19.428554   \n",
       "                             n_trees=10                                                  7.418071   \n",
       "Spectral Residual (SR)       mag_window_size=40,score_window_size=28                     4.967755   \n",
       "                             mag_window_size=40,score_window_size=52                     4.897070   \n",
       "                             mag_window_size=52,score_window_size=28                     4.823927   \n",
       "                             mag_window_size=40,score_window_size=40                     4.812128   \n",
       "                             mag_window_size=28,score_window_size=28                     5.099192   \n",
       "                             mag_window_size=52,score_window_size=52                     4.888743   \n",
       "                             mag_window_size=28,score_window_size=52                     4.962817   \n",
       "                             mag_window_size=52,score_window_size=40                     4.862320   \n",
       "                             mag_window_size=28,score_window_size=40                     4.931573   \n",
       "Random Forest Regressor (RR) train_window_size=500,n_trees=1000                          7.116011   \n",
       "                             train_window_size=500,n_trees=100                           6.439457   \n",
       "                             train_window_size=1000,n_trees=10                           6.621414   \n",
       "                             train_window_size=500,n_trees=10                            6.588819   \n",
       "                             train_window_size=1000,n_trees=100                          6.222891   \n",
       "                             train_window_size=1000,n_trees=1000                         7.344901   \n",
       "                             train_window_size=100,n_trees=10                            6.580194   \n",
       "                             train_window_size=100,n_trees=1000                          7.198034   \n",
       "                             train_window_size=100,n_trees=100                           6.742528   \n",
       "                             train_window_size=50,n_trees=10                             6.877913   \n",
       "                             train_window_size=50,n_trees=1000                           7.206852   \n",
       "                             train_window_size=50,n_trees=100                            6.580275   \n",
       "LaserDBN                     n_bins=10                                                   6.486712   \n",
       "                             n_bins=8                                                    6.286792   \n",
       "                             n_bins=5                                                    6.517359   \n",
       "Hybrid KNN                   n_neighbors=10,n_estimators=1000                           13.640841   \n",
       "                             n_neighbors=5,n_estimators=10                              11.646781   \n",
       "                             n_neighbors=10,n_estimators=10                             12.203369   \n",
       "                             n_neighbors=20,n_estimators=10                             12.601245   \n",
       "                             n_neighbors=30,n_estimators=10                             12.916162   \n",
       "                             n_neighbors=5,n_estimators=100                             13.492753   \n",
       "                             n_neighbors=40,n_estimators=10                             13.167603   \n",
       "                             n_neighbors=50,n_estimators=10                             12.895360   \n",
       "                             n_neighbors=10,n_estimators=100                            14.913010   \n",
       "                             n_neighbors=20,n_estimators=100                            15.631856   \n",
       "                             n_neighbors=30,n_estimators=100                            15.969181   \n",
       "                             n_neighbors=40,n_estimators=100                            17.428080   \n",
       "                             n_neighbors=5,n_estimators=1000                            17.813734   \n",
       "                             n_neighbors=50,n_estimators=100                            18.244306   \n",
       "                             n_neighbors=20,n_estimators=1000                                 NaN   \n",
       "                             n_neighbors=30,n_estimators=1000                                 NaN   \n",
       "                             n_neighbors=40,n_estimators=1000                                 NaN   \n",
       "                             n_neighbors=50,n_estimators=1000                                 NaN   \n",
       "FFT                          context_window_size=5                                       5.347193   \n",
       "                             context_window_size=10                                      5.540541   \n",
       "                             context_window_size=30                                      5.638268   \n",
       "                             context_window_size=50                                      5.234794   \n",
       "                             context_window_size=40                                      5.750805   \n",
       "DeepAnT                      prediction_window_size=50                                  10.798391   \n",
       "                             prediction_window_size=1                                   10.854502   \n",
       "                             prediction_window_size=5                                   10.606166   \n",
       "                             prediction_window_size=10                                  11.053138   \n",
       "\n",
       "                                                                                repetition  \n",
       "                                                                                     count  \n",
       "algorithm                    optim_params                                                   \n",
       "k-Means                      n_clusters=50                                             155  \n",
       "                             n_clusters=10                                             155  \n",
       "                             n_clusters=40                                             155  \n",
       "                             n_clusters=30                                             155  \n",
       "                             n_clusters=5                                              155  \n",
       "XGBoosting (RR)              n_estimators=100,train_window_size=500,n_trees=10         135  \n",
       "                             n_estimators=1000,train_window_size=500,n_trees=10        135  \n",
       "                             n_estimators=100,train_window_size=1000,n_trees=10        135  \n",
       "                             n_estimators=1000,train_window_size=100,n_trees=10        135  \n",
       "                             n_estimators=100,train_window_size=100,n_trees=10         135  \n",
       "                             n_estimators=100,train_window_size=50,n_trees=1000        135  \n",
       "                             n_estimators=100,train_window_size=100,n_trees=100        135  \n",
       "                             n_estimators=1000,train_window_size=50,n_trees=100        135  \n",
       "                             n_estimators=100,train_window_size=500,n_trees=100        135  \n",
       "                             n_estimators=1000,train_window_size=50,n_trees=10         135  \n",
       "                             n_estimators=100,train_window_size=50,n_trees=100         135  \n",
       "                             n_estimators=100,train_window_size=50,n_trees=10          135  \n",
       "                             n_estimators=10,train_window_size=500,n_trees=1000        135  \n",
       "                             n_estimators=10,train_window_size=1000,n_trees=100        135  \n",
       "                             n_estimators=10,train_window_size=1000,n_trees=10         135  \n",
       "                             n_estimators=10,train_window_size=500,n_trees=100         135  \n",
       "                             n_estimators=10,train_window_size=500,n_trees=10          135  \n",
       "                             n_estimators=10,train_window_size=100,n_trees=1000        135  \n",
       "                             n_estimators=10,train_window_size=100,n_trees=100         135  \n",
       "                             n_estimators=10,train_window_size=100,n_trees=10          135  \n",
       "                             n_estimators=10,train_window_size=50,n_trees=10           135  \n",
       "                             n_estimators=10,train_window_size=50,n_trees=1000         135  \n",
       "                             n_estimators=10,train_window_size=50,n_trees=100          135  \n",
       "                             n_estimators=10,train_window_size=1000,n_trees=...        135  \n",
       "                             n_estimators=100,train_window_size=100,n_trees=...        135  \n",
       "                             n_estimators=100,train_window_size=1000,n_trees...        135  \n",
       "                             n_estimators=100,train_window_size=1000,n_trees...        135  \n",
       "                             n_estimators=100,train_window_size=500,n_trees=...        135  \n",
       "                             n_estimators=1000,train_window_size=100,n_trees...        135  \n",
       "                             n_estimators=1000,train_window_size=100,n_trees...        135  \n",
       "                             n_estimators=1000,train_window_size=1000,n_tree...        135  \n",
       "                             n_estimators=1000,train_window_size=1000,n_tree...        135  \n",
       "                             n_estimators=1000,train_window_size=1000,n_tree...        135  \n",
       "                             n_estimators=1000,train_window_size=50,n_trees=...        135  \n",
       "                             n_estimators=1000,train_window_size=500,n_trees...        135  \n",
       "                             n_estimators=1000,train_window_size=500,n_trees...        135  \n",
       "Subsequence LOF              n_neighbors=50,leaf_size=20                               540  \n",
       "                             n_neighbors=50,leaf_size=30                               540  \n",
       "                             n_neighbors=50,leaf_size=40                               540  \n",
       "                             n_neighbors=40,leaf_size=20                               540  \n",
       "                             n_neighbors=40,leaf_size=30                               540  \n",
       "                             n_neighbors=40,leaf_size=40                               540  \n",
       "                             n_neighbors=30,leaf_size=20                               540  \n",
       "                             n_neighbors=30,leaf_size=30                               540  \n",
       "                             n_neighbors=30,leaf_size=40                               540  \n",
       "                             n_neighbors=20,leaf_size=20                               540  \n",
       "                             n_neighbors=20,leaf_size=30                               540  \n",
       "                             n_neighbors=20,leaf_size=40                               540  \n",
       "                             n_neighbors=10,leaf_size=20                               540  \n",
       "                             n_neighbors=10,leaf_size=30                               540  \n",
       "                             n_neighbors=10,leaf_size=40                               540  \n",
       "                             n_neighbors=5,leaf_size=20                                540  \n",
       "                             n_neighbors=5,leaf_size=30                                540  \n",
       "                             n_neighbors=5,leaf_size=40                                540  \n",
       "Subsequence IF               n_trees=100                                               540  \n",
       "                             n_trees=1000                                              540  \n",
       "                             n_trees=10                                                540  \n",
       "Spectral Residual (SR)       mag_window_size=40,score_window_size=28                   540  \n",
       "                             mag_window_size=40,score_window_size=52                   540  \n",
       "                             mag_window_size=52,score_window_size=28                   540  \n",
       "                             mag_window_size=40,score_window_size=40                   540  \n",
       "                             mag_window_size=28,score_window_size=28                   540  \n",
       "                             mag_window_size=52,score_window_size=52                   540  \n",
       "                             mag_window_size=28,score_window_size=52                   540  \n",
       "                             mag_window_size=52,score_window_size=40                   540  \n",
       "                             mag_window_size=28,score_window_size=40                   540  \n",
       "Random Forest Regressor (RR) train_window_size=500,n_trees=1000                        135  \n",
       "                             train_window_size=500,n_trees=100                         135  \n",
       "                             train_window_size=1000,n_trees=10                         135  \n",
       "                             train_window_size=500,n_trees=10                          135  \n",
       "                             train_window_size=1000,n_trees=100                        135  \n",
       "                             train_window_size=1000,n_trees=1000                       135  \n",
       "                             train_window_size=100,n_trees=10                          135  \n",
       "                             train_window_size=100,n_trees=1000                        135  \n",
       "                             train_window_size=100,n_trees=100                         135  \n",
       "                             train_window_size=50,n_trees=10                           135  \n",
       "                             train_window_size=50,n_trees=1000                         135  \n",
       "                             train_window_size=50,n_trees=100                          135  \n",
       "LaserDBN                     n_bins=10                                                 155  \n",
       "                             n_bins=8                                                  155  \n",
       "                             n_bins=5                                                  155  \n",
       "Hybrid KNN                   n_neighbors=10,n_estimators=1000                          155  \n",
       "                             n_neighbors=5,n_estimators=10                             155  \n",
       "                             n_neighbors=10,n_estimators=10                            155  \n",
       "                             n_neighbors=20,n_estimators=10                            155  \n",
       "                             n_neighbors=30,n_estimators=10                            155  \n",
       "                             n_neighbors=5,n_estimators=100                            155  \n",
       "                             n_neighbors=40,n_estimators=10                            155  \n",
       "                             n_neighbors=50,n_estimators=10                            155  \n",
       "                             n_neighbors=10,n_estimators=100                           155  \n",
       "                             n_neighbors=20,n_estimators=100                           155  \n",
       "                             n_neighbors=30,n_estimators=100                           155  \n",
       "                             n_neighbors=40,n_estimators=100                           155  \n",
       "                             n_neighbors=5,n_estimators=1000                           155  \n",
       "                             n_neighbors=50,n_estimators=100                           155  \n",
       "                             n_neighbors=20,n_estimators=1000                          155  \n",
       "                             n_neighbors=30,n_estimators=1000                          155  \n",
       "                             n_neighbors=40,n_estimators=1000                          155  \n",
       "                             n_neighbors=50,n_estimators=1000                          155  \n",
       "FFT                          context_window_size=5                                     135  \n",
       "                             context_window_size=10                                    135  \n",
       "                             context_window_size=30                                    135  \n",
       "                             context_window_size=50                                    135  \n",
       "                             context_window_size=40                                    135  \n",
       "DeepAnT                      prediction_window_size=50                                 620  \n",
       "                             prediction_window_size=1                                  620  \n",
       "                             prediction_window_size=5                                  620  \n",
       "                             prediction_window_size=10                                 620  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "sort_by = (\"ROC_AUC\", \"mean\")\n",
    "metric_agg_type = [\"mean\", \"median\"]\n",
    "time_agg_type = \"mean\"\n",
    "aggs = {\n",
    "    \"AVERAGE_PRECISION\": metric_agg_type,\n",
    "    \"RANGE_PR_AUC\": metric_agg_type,\n",
    "    \"PR_AUC\": metric_agg_type,\n",
    "    \"ROC_AUC\": metric_agg_type,\n",
    "    \"train_main_time\": time_agg_type,\n",
    "    \"execute_main_time\": time_agg_type,\n",
    "    \"repetition\": \"count\"\n",
    "}\n",
    "\n",
    "df_tmp = df.reset_index()\n",
    "df_tmp = df_tmp.groupby(by=[\"algorithm\", \"optim_params\"]).agg(aggs)\n",
    "df_tmp = (df_tmp\n",
    "          .reset_index()\n",
    "          .sort_values(by=[\"algorithm\", sort_by], ascending=False)\n",
    "          .set_index([\"algorithm\", \"optim_params\"]))\n",
    "with pd.option_context(\"display.max_rows\", None, \"display.max_columns\", None):\n",
    "    display(df_tmp)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7992833e",
   "metadata": {},
   "source": [
    "#### Selected parameters\n",
    "\n",
    "- k-Means: `n_clusters=50` (more are usually better)\n",
    "- XGBoosting (RR): `n_estimators=500,train_window_size=500,n_trees=10` (more estimators are better)\n",
    "- Subsequence LOF: `n_neighbors=50,leaf_size=20` (robust to leaf_size)\n",
    "- Subsequence IF: `n_trees=100`\n",
    "- Spectral Residual (SR): `mag_window_size=40,score_window_size=40` (robust, but bad performance)\n",
    "- Random Forest Regressor (RR): `train_window_size=500,n_trees=500` (more trees are better)\n",
    "- LaserDBN: `n_bins=10` (more are better; marginal improvement)\n",
    "- Hybrid KNN: `n_neighbors=10,n_estimators=1000` (less neighbors and more estimators are better)\n",
    "- FFT: `context_window_size=5` (robust, but bad performance)\n",
    "- DeepAnT: `prediction_window_size=50`\n",
    "\n",
    "Summary:\n",
    "\n",
    "- n_clusters=50\n",
    "- n_estimators=500\n",
    "- train_window_size=500\n",
    "- n_trees=500\n",
    "- n_neighbors=50\n",
    "- mag_window_size=40\n",
    "- score_window_size=40\n",
    "- prediction_window_size=50\n",
    "- n_bins=10 (**re-test for other algorithms!**)\n",
    "- context_window_size=5 (**re-test for other algorithms!**)\n",
    "- Overwrites for Hybrid KNN: `n_neighbors=10,n_estimators=1000`\n",
    "- Overwrites for XGBoosting (RR): `n_trees=10`"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "52cc7556",
   "metadata": {},
   "outputs": [],
   "source": [
    "plot_scores([(\"k-Means\", \"n_clusters=50\"), (\"k-Means\", \"n_clusters=5\")], \"ecg-channels-single-of-5\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2ec7865b",
   "metadata": {},
   "source": [
    "---\n",
    "\n",
    "### Window size parameter assessment"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "2f65f78d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>algorithm</th>\n",
       "      <th>collection</th>\n",
       "      <th>dataset</th>\n",
       "      <th>algo_training_type</th>\n",
       "      <th>algo_input_dimensionality</th>\n",
       "      <th>dataset_training_type</th>\n",
       "      <th>dataset_input_dimensionality</th>\n",
       "      <th>train_preprocess_time</th>\n",
       "      <th>train_main_time</th>\n",
       "      <th>execute_preprocess_time</th>\n",
       "      <th>...</th>\n",
       "      <th>error_message</th>\n",
       "      <th>repetition</th>\n",
       "      <th>hyper_params</th>\n",
       "      <th>hyper_params_id</th>\n",
       "      <th>ROC_AUC</th>\n",
       "      <th>PR_AUC</th>\n",
       "      <th>RANGE_PR_AUC</th>\n",
       "      <th>AVERAGE_PRECISION</th>\n",
       "      <th>dataset_name</th>\n",
       "      <th>window_size_group</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>DeepAnT</td>\n",
       "      <td>GutenTAG</td>\n",
       "      <td>ecg-channels-all-of-3.semi-supervised</td>\n",
       "      <td>SEMI_SUPERVISED</td>\n",
       "      <td>MULTIVARIATE</td>\n",
       "      <td>SEMI_SUPERVISED</td>\n",
       "      <td>MULTIVARIATE</td>\n",
       "      <td>NaN</td>\n",
       "      <td>3490.080107</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>{\"batch_size\": 64, \"early_stopping_delta\": 0.0...</td>\n",
       "      <td>c19923440357dc06942f10287ac3b6e4</td>\n",
       "      <td>0.082442</td>\n",
       "      <td>0.005145</td>\n",
       "      <td>0.485061</td>\n",
       "      <td>0.005201</td>\n",
       "      <td>ecg-channels-all-of-3</td>\n",
       "      <td>0.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>DeepAnT</td>\n",
       "      <td>GutenTAG</td>\n",
       "      <td>ecg-channels-single-of-10.semi-supervised</td>\n",
       "      <td>SEMI_SUPERVISED</td>\n",
       "      <td>MULTIVARIATE</td>\n",
       "      <td>SEMI_SUPERVISED</td>\n",
       "      <td>MULTIVARIATE</td>\n",
       "      <td>NaN</td>\n",
       "      <td>3136.354387</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>{\"batch_size\": 64, \"early_stopping_delta\": 0.0...</td>\n",
       "      <td>c19923440357dc06942f10287ac3b6e4</td>\n",
       "      <td>0.256400</td>\n",
       "      <td>0.006263</td>\n",
       "      <td>0.237304</td>\n",
       "      <td>0.006335</td>\n",
       "      <td>ecg-channels-single-of-10</td>\n",
       "      <td>0.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>DeepAnT</td>\n",
       "      <td>GutenTAG</td>\n",
       "      <td>ecg-channels-single-of-2.semi-supervised</td>\n",
       "      <td>SEMI_SUPERVISED</td>\n",
       "      <td>MULTIVARIATE</td>\n",
       "      <td>SEMI_SUPERVISED</td>\n",
       "      <td>MULTIVARIATE</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2725.753779</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>{\"batch_size\": 64, \"early_stopping_delta\": 0.0...</td>\n",
       "      <td>c19923440357dc06942f10287ac3b6e4</td>\n",
       "      <td>0.213586</td>\n",
       "      <td>0.005920</td>\n",
       "      <td>0.213420</td>\n",
       "      <td>0.005987</td>\n",
       "      <td>ecg-channels-single-of-2</td>\n",
       "      <td>0.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>DeepAnT</td>\n",
       "      <td>GutenTAG</td>\n",
       "      <td>ecg-channels-single-of-20.semi-supervised</td>\n",
       "      <td>SEMI_SUPERVISED</td>\n",
       "      <td>MULTIVARIATE</td>\n",
       "      <td>SEMI_SUPERVISED</td>\n",
       "      <td>MULTIVARIATE</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2572.371926</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>{\"batch_size\": 64, \"early_stopping_delta\": 0.0...</td>\n",
       "      <td>c19923440357dc06942f10287ac3b6e4</td>\n",
       "      <td>0.303753</td>\n",
       "      <td>0.006619</td>\n",
       "      <td>0.247859</td>\n",
       "      <td>0.006699</td>\n",
       "      <td>ecg-channels-single-of-20</td>\n",
       "      <td>0.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>DeepAnT</td>\n",
       "      <td>GutenTAG</td>\n",
       "      <td>ecg-channels-single-of-5.semi-supervised</td>\n",
       "      <td>SEMI_SUPERVISED</td>\n",
       "      <td>MULTIVARIATE</td>\n",
       "      <td>SEMI_SUPERVISED</td>\n",
       "      <td>MULTIVARIATE</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1938.601979</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>{\"batch_size\": 64, \"early_stopping_delta\": 0.0...</td>\n",
       "      <td>c19923440357dc06942f10287ac3b6e4</td>\n",
       "      <td>0.237219</td>\n",
       "      <td>0.006135</td>\n",
       "      <td>0.276975</td>\n",
       "      <td>0.006205</td>\n",
       "      <td>ecg-channels-single-of-5</td>\n",
       "      <td>0.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29860</th>\n",
       "      <td>Subsequence LOF</td>\n",
       "      <td>GutenTAG</td>\n",
       "      <td>sinus-type-pattern-shift.unsupervised</td>\n",
       "      <td>UNSUPERVISED</td>\n",
       "      <td>UNIVARIATE</td>\n",
       "      <td>UNSUPERVISED</td>\n",
       "      <td>UNIVARIATE</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>{\"distance_metric_order\": 2, \"leaf_size\": 40, ...</td>\n",
       "      <td>cdecfb673e7e0913e8a5d3910751c387</td>\n",
       "      <td>0.986935</td>\n",
       "      <td>0.657385</td>\n",
       "      <td>0.637168</td>\n",
       "      <td>0.659779</td>\n",
       "      <td>sinus-type-pattern-shift</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29861</th>\n",
       "      <td>Subsequence LOF</td>\n",
       "      <td>GutenTAG</td>\n",
       "      <td>sinus-type-pattern.unsupervised</td>\n",
       "      <td>UNSUPERVISED</td>\n",
       "      <td>UNIVARIATE</td>\n",
       "      <td>UNSUPERVISED</td>\n",
       "      <td>UNIVARIATE</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>{\"distance_metric_order\": 2, \"leaf_size\": 40, ...</td>\n",
       "      <td>cdecfb673e7e0913e8a5d3910751c387</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>0.995035</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>sinus-type-pattern</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29862</th>\n",
       "      <td>Subsequence LOF</td>\n",
       "      <td>GutenTAG</td>\n",
       "      <td>sinus-type-platform.unsupervised</td>\n",
       "      <td>UNSUPERVISED</td>\n",
       "      <td>UNIVARIATE</td>\n",
       "      <td>UNSUPERVISED</td>\n",
       "      <td>UNIVARIATE</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>{\"distance_metric_order\": 2, \"leaf_size\": 40, ...</td>\n",
       "      <td>cdecfb673e7e0913e8a5d3910751c387</td>\n",
       "      <td>0.816412</td>\n",
       "      <td>0.339532</td>\n",
       "      <td>0.337769</td>\n",
       "      <td>0.347330</td>\n",
       "      <td>sinus-type-platform</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29863</th>\n",
       "      <td>Subsequence LOF</td>\n",
       "      <td>GutenTAG</td>\n",
       "      <td>sinus-type-trend.unsupervised</td>\n",
       "      <td>UNSUPERVISED</td>\n",
       "      <td>UNIVARIATE</td>\n",
       "      <td>UNSUPERVISED</td>\n",
       "      <td>UNIVARIATE</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>{\"distance_metric_order\": 2, \"leaf_size\": 40, ...</td>\n",
       "      <td>cdecfb673e7e0913e8a5d3910751c387</td>\n",
       "      <td>0.999963</td>\n",
       "      <td>0.996852</td>\n",
       "      <td>0.985046</td>\n",
       "      <td>0.996865</td>\n",
       "      <td>sinus-type-trend</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29864</th>\n",
       "      <td>Subsequence LOF</td>\n",
       "      <td>GutenTAG</td>\n",
       "      <td>sinus-type-variance.unsupervised</td>\n",
       "      <td>UNSUPERVISED</td>\n",
       "      <td>UNIVARIATE</td>\n",
       "      <td>UNSUPERVISED</td>\n",
       "      <td>UNIVARIATE</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>{\"distance_metric_order\": 2, \"leaf_size\": 40, ...</td>\n",
       "      <td>cdecfb673e7e0913e8a5d3910751c387</td>\n",
       "      <td>0.999985</td>\n",
       "      <td>0.998526</td>\n",
       "      <td>0.993799</td>\n",
       "      <td>0.998533</td>\n",
       "      <td>sinus-type-variance</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>18680 rows × 23 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "             algorithm collection                                    dataset  \\\n",
       "0              DeepAnT   GutenTAG      ecg-channels-all-of-3.semi-supervised   \n",
       "1              DeepAnT   GutenTAG  ecg-channels-single-of-10.semi-supervised   \n",
       "2              DeepAnT   GutenTAG   ecg-channels-single-of-2.semi-supervised   \n",
       "3              DeepAnT   GutenTAG  ecg-channels-single-of-20.semi-supervised   \n",
       "4              DeepAnT   GutenTAG   ecg-channels-single-of-5.semi-supervised   \n",
       "...                ...        ...                                        ...   \n",
       "29860  Subsequence LOF   GutenTAG      sinus-type-pattern-shift.unsupervised   \n",
       "29861  Subsequence LOF   GutenTAG            sinus-type-pattern.unsupervised   \n",
       "29862  Subsequence LOF   GutenTAG           sinus-type-platform.unsupervised   \n",
       "29863  Subsequence LOF   GutenTAG              sinus-type-trend.unsupervised   \n",
       "29864  Subsequence LOF   GutenTAG           sinus-type-variance.unsupervised   \n",
       "\n",
       "      algo_training_type algo_input_dimensionality dataset_training_type  \\\n",
       "0        SEMI_SUPERVISED              MULTIVARIATE       SEMI_SUPERVISED   \n",
       "1        SEMI_SUPERVISED              MULTIVARIATE       SEMI_SUPERVISED   \n",
       "2        SEMI_SUPERVISED              MULTIVARIATE       SEMI_SUPERVISED   \n",
       "3        SEMI_SUPERVISED              MULTIVARIATE       SEMI_SUPERVISED   \n",
       "4        SEMI_SUPERVISED              MULTIVARIATE       SEMI_SUPERVISED   \n",
       "...                  ...                       ...                   ...   \n",
       "29860       UNSUPERVISED                UNIVARIATE          UNSUPERVISED   \n",
       "29861       UNSUPERVISED                UNIVARIATE          UNSUPERVISED   \n",
       "29862       UNSUPERVISED                UNIVARIATE          UNSUPERVISED   \n",
       "29863       UNSUPERVISED                UNIVARIATE          UNSUPERVISED   \n",
       "29864       UNSUPERVISED                UNIVARIATE          UNSUPERVISED   \n",
       "\n",
       "      dataset_input_dimensionality  train_preprocess_time  train_main_time  \\\n",
       "0                     MULTIVARIATE                    NaN      3490.080107   \n",
       "1                     MULTIVARIATE                    NaN      3136.354387   \n",
       "2                     MULTIVARIATE                    NaN      2725.753779   \n",
       "3                     MULTIVARIATE                    NaN      2572.371926   \n",
       "4                     MULTIVARIATE                    NaN      1938.601979   \n",
       "...                            ...                    ...              ...   \n",
       "29860                   UNIVARIATE                    NaN              NaN   \n",
       "29861                   UNIVARIATE                    NaN              NaN   \n",
       "29862                   UNIVARIATE                    NaN              NaN   \n",
       "29863                   UNIVARIATE                    NaN              NaN   \n",
       "29864                   UNIVARIATE                    NaN              NaN   \n",
       "\n",
       "       execute_preprocess_time  ...  error_message  repetition  \\\n",
       "0                          NaN  ...            NaN           1   \n",
       "1                          NaN  ...            NaN           1   \n",
       "2                          NaN  ...            NaN           1   \n",
       "3                          NaN  ...            NaN           1   \n",
       "4                          NaN  ...            NaN           1   \n",
       "...                        ...  ...            ...         ...   \n",
       "29860                      NaN  ...            NaN           1   \n",
       "29861                      NaN  ...            NaN           1   \n",
       "29862                      NaN  ...            NaN           1   \n",
       "29863                      NaN  ...            NaN           1   \n",
       "29864                      NaN  ...            NaN           1   \n",
       "\n",
       "                                            hyper_params  \\\n",
       "0      {\"batch_size\": 64, \"early_stopping_delta\": 0.0...   \n",
       "1      {\"batch_size\": 64, \"early_stopping_delta\": 0.0...   \n",
       "2      {\"batch_size\": 64, \"early_stopping_delta\": 0.0...   \n",
       "3      {\"batch_size\": 64, \"early_stopping_delta\": 0.0...   \n",
       "4      {\"batch_size\": 64, \"early_stopping_delta\": 0.0...   \n",
       "...                                                  ...   \n",
       "29860  {\"distance_metric_order\": 2, \"leaf_size\": 40, ...   \n",
       "29861  {\"distance_metric_order\": 2, \"leaf_size\": 40, ...   \n",
       "29862  {\"distance_metric_order\": 2, \"leaf_size\": 40, ...   \n",
       "29863  {\"distance_metric_order\": 2, \"leaf_size\": 40, ...   \n",
       "29864  {\"distance_metric_order\": 2, \"leaf_size\": 40, ...   \n",
       "\n",
       "                        hyper_params_id   ROC_AUC    PR_AUC RANGE_PR_AUC  \\\n",
       "0      c19923440357dc06942f10287ac3b6e4  0.082442  0.005145     0.485061   \n",
       "1      c19923440357dc06942f10287ac3b6e4  0.256400  0.006263     0.237304   \n",
       "2      c19923440357dc06942f10287ac3b6e4  0.213586  0.005920     0.213420   \n",
       "3      c19923440357dc06942f10287ac3b6e4  0.303753  0.006619     0.247859   \n",
       "4      c19923440357dc06942f10287ac3b6e4  0.237219  0.006135     0.276975   \n",
       "...                                 ...       ...       ...          ...   \n",
       "29860  cdecfb673e7e0913e8a5d3910751c387  0.986935  0.657385     0.637168   \n",
       "29861  cdecfb673e7e0913e8a5d3910751c387  1.000000  1.000000     0.995035   \n",
       "29862  cdecfb673e7e0913e8a5d3910751c387  0.816412  0.339532     0.337769   \n",
       "29863  cdecfb673e7e0913e8a5d3910751c387  0.999963  0.996852     0.985046   \n",
       "29864  cdecfb673e7e0913e8a5d3910751c387  0.999985  0.998526     0.993799   \n",
       "\n",
       "       AVERAGE_PRECISION               dataset_name  window_size_group  \n",
       "0               0.005201      ecg-channels-all-of-3                0.5  \n",
       "1               0.006335  ecg-channels-single-of-10                0.5  \n",
       "2               0.005987   ecg-channels-single-of-2                0.5  \n",
       "3               0.006699  ecg-channels-single-of-20                0.5  \n",
       "4               0.006205   ecg-channels-single-of-5                0.5  \n",
       "...                  ...                        ...                ...  \n",
       "29860           0.659779   sinus-type-pattern-shift                2.0  \n",
       "29861           1.000000         sinus-type-pattern                2.0  \n",
       "29862           0.347330        sinus-type-platform                2.0  \n",
       "29863           0.996865           sinus-type-trend                2.0  \n",
       "29864           0.998533        sinus-type-variance                2.0  \n",
       "\n",
       "[18680 rows x 23 columns]"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "algo_list = [\"Subsequence LOF\", \"Subsequence IF\", \"Spectral Residual (SR)\", \"DeepAnT\"]\n",
    "df2 = df[df[\"algorithm\"].isin(algo_list)].copy()\n",
    "\n",
    "# overwrite optim_params column\n",
    "df2 = df2.drop(columns=[\"optim_params\"])\n",
    "df2[\"window_size\"] = \"\"\n",
    "for algo in algo_list:\n",
    "    df_algo = df2.loc[df2[\"algorithm\"] == algo]\n",
    "    df2.loc[df_algo.index, \"window_size\"] = df_algo[\"hyper_params\"].apply(extract_hyper_params([\"window_size\"]))\n",
    "df2[\"window_size\"] = df2[\"window_size\"].str.split(\"=\").apply(lambda v: v[1]).astype(int)\n",
    "df2[\"period_size\"] = df2[\"dataset\"].apply(lambda d: dmgr.get((\"GutenTAG\", d)).period_size)\n",
    "df2[\"window_size_group\"] = df2[\"window_size\"] / df2[\"period_size\"]\n",
    "df2[\"window_size_group\"] = (df2[\"window_size_group\"]\n",
    "                            .fillna(df2[\"window_size\"])\n",
    "                            .round(1)\n",
    "                            .replace(50., 0.5)\n",
    "                            .replace(100, 1.0)\n",
    "                            .replace(150, 1.5)\n",
    "                            .replace(200, 2.0))\n",
    "df2 = df2.drop(columns=[\"window_size\", \"period_size\"])\n",
    "df2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "8555b0dc",
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr:last-of-type th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th colspan=\"2\" halign=\"left\">AVERAGE_PRECISION</th>\n",
       "      <th colspan=\"2\" halign=\"left\">RANGE_PR_AUC</th>\n",
       "      <th colspan=\"2\" halign=\"left\">PR_AUC</th>\n",
       "      <th colspan=\"2\" halign=\"left\">ROC_AUC</th>\n",
       "      <th>train_main_time</th>\n",
       "      <th>execute_main_time</th>\n",
       "      <th>experiment IDs</th>\n",
       "      <th>repetition</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>mean</th>\n",
       "      <th>median</th>\n",
       "      <th>mean</th>\n",
       "      <th>median</th>\n",
       "      <th>mean</th>\n",
       "      <th>median</th>\n",
       "      <th>mean</th>\n",
       "      <th>median</th>\n",
       "      <th>mean</th>\n",
       "      <th>mean</th>\n",
       "      <th></th>\n",
       "      <th>count</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>algorithm</th>\n",
       "      <th>window_size_group</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"4\" valign=\"top\">Subsequence LOF</th>\n",
       "      <th>2.0</th>\n",
       "      <td>0.677201</td>\n",
       "      <td>0.793231</td>\n",
       "      <td>0.644477</td>\n",
       "      <td>0.665071</td>\n",
       "      <td>0.676099</td>\n",
       "      <td>0.788295</td>\n",
       "      <td>0.924573</td>\n",
       "      <td>0.995574</td>\n",
       "      <td>NaN</td>\n",
       "      <td>23.317364</td>\n",
       "      <td>20550-29864</td>\n",
       "      <td>2430</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1.5</th>\n",
       "      <td>0.678294</td>\n",
       "      <td>0.787024</td>\n",
       "      <td>0.644560</td>\n",
       "      <td>0.695121</td>\n",
       "      <td>0.677149</td>\n",
       "      <td>0.785187</td>\n",
       "      <td>0.918495</td>\n",
       "      <td>0.996107</td>\n",
       "      <td>NaN</td>\n",
       "      <td>19.442469</td>\n",
       "      <td>20415-29729</td>\n",
       "      <td>2430</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1.0</th>\n",
       "      <td>0.710013</td>\n",
       "      <td>0.853176</td>\n",
       "      <td>0.678452</td>\n",
       "      <td>0.770666</td>\n",
       "      <td>0.708901</td>\n",
       "      <td>0.852707</td>\n",
       "      <td>0.915659</td>\n",
       "      <td>0.997009</td>\n",
       "      <td>NaN</td>\n",
       "      <td>15.650241</td>\n",
       "      <td>20280-29594</td>\n",
       "      <td>2430</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0.5</th>\n",
       "      <td>0.715130</td>\n",
       "      <td>0.851845</td>\n",
       "      <td>0.671394</td>\n",
       "      <td>0.735250</td>\n",
       "      <td>0.714049</td>\n",
       "      <td>0.851434</td>\n",
       "      <td>0.909146</td>\n",
       "      <td>0.992777</td>\n",
       "      <td>NaN</td>\n",
       "      <td>11.195135</td>\n",
       "      <td>20145-29459</td>\n",
       "      <td>2430</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"4\" valign=\"top\">Subsequence IF</th>\n",
       "      <th>1.5</th>\n",
       "      <td>0.375868</td>\n",
       "      <td>0.195873</td>\n",
       "      <td>0.406711</td>\n",
       "      <td>0.356624</td>\n",
       "      <td>0.372936</td>\n",
       "      <td>0.191174</td>\n",
       "      <td>0.794625</td>\n",
       "      <td>0.862731</td>\n",
       "      <td>NaN</td>\n",
       "      <td>12.162610</td>\n",
       "      <td>18795-20009</td>\n",
       "      <td>405</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2.0</th>\n",
       "      <td>0.385378</td>\n",
       "      <td>0.173336</td>\n",
       "      <td>0.434137</td>\n",
       "      <td>0.357213</td>\n",
       "      <td>0.384005</td>\n",
       "      <td>0.170053</td>\n",
       "      <td>0.782315</td>\n",
       "      <td>0.853456</td>\n",
       "      <td>NaN</td>\n",
       "      <td>13.135336</td>\n",
       "      <td>18930-20144</td>\n",
       "      <td>405</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1.0</th>\n",
       "      <td>0.379023</td>\n",
       "      <td>0.198106</td>\n",
       "      <td>0.419387</td>\n",
       "      <td>0.358280</td>\n",
       "      <td>0.376608</td>\n",
       "      <td>0.194197</td>\n",
       "      <td>0.781650</td>\n",
       "      <td>0.864849</td>\n",
       "      <td>NaN</td>\n",
       "      <td>11.188577</td>\n",
       "      <td>18660-19874</td>\n",
       "      <td>405</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0.5</th>\n",
       "      <td>0.301753</td>\n",
       "      <td>0.134934</td>\n",
       "      <td>0.336601</td>\n",
       "      <td>0.237578</td>\n",
       "      <td>0.298906</td>\n",
       "      <td>0.125000</td>\n",
       "      <td>0.742701</td>\n",
       "      <td>0.813636</td>\n",
       "      <td>NaN</td>\n",
       "      <td>10.683038</td>\n",
       "      <td>18525-19739</td>\n",
       "      <td>405</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"4\" valign=\"top\">Spectral Residual (SR)</th>\n",
       "      <th>2.0</th>\n",
       "      <td>0.133300</td>\n",
       "      <td>0.057824</td>\n",
       "      <td>0.162506</td>\n",
       "      <td>0.064206</td>\n",
       "      <td>0.136070</td>\n",
       "      <td>0.058108</td>\n",
       "      <td>0.573339</td>\n",
       "      <td>0.542867</td>\n",
       "      <td>NaN</td>\n",
       "      <td>4.629574</td>\n",
       "      <td>14070-18524</td>\n",
       "      <td>1215</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0.5</th>\n",
       "      <td>0.137767</td>\n",
       "      <td>0.061300</td>\n",
       "      <td>0.146608</td>\n",
       "      <td>0.068046</td>\n",
       "      <td>0.136600</td>\n",
       "      <td>0.059844</td>\n",
       "      <td>0.569153</td>\n",
       "      <td>0.533754</td>\n",
       "      <td>NaN</td>\n",
       "      <td>5.379403</td>\n",
       "      <td>13665-18119</td>\n",
       "      <td>1215</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1.5</th>\n",
       "      <td>0.136132</td>\n",
       "      <td>0.054127</td>\n",
       "      <td>0.156055</td>\n",
       "      <td>0.063705</td>\n",
       "      <td>0.134636</td>\n",
       "      <td>0.053187</td>\n",
       "      <td>0.565776</td>\n",
       "      <td>0.538426</td>\n",
       "      <td>NaN</td>\n",
       "      <td>4.757040</td>\n",
       "      <td>13935-18389</td>\n",
       "      <td>1215</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1.0</th>\n",
       "      <td>0.135212</td>\n",
       "      <td>0.066699</td>\n",
       "      <td>0.145925</td>\n",
       "      <td>0.068548</td>\n",
       "      <td>0.134208</td>\n",
       "      <td>0.065900</td>\n",
       "      <td>0.540099</td>\n",
       "      <td>0.528240</td>\n",
       "      <td>NaN</td>\n",
       "      <td>4.898662</td>\n",
       "      <td>13800-18254</td>\n",
       "      <td>1215</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"4\" valign=\"top\">DeepAnT</th>\n",
       "      <th>2.0</th>\n",
       "      <td>0.523242</td>\n",
       "      <td>0.582397</td>\n",
       "      <td>0.520148</td>\n",
       "      <td>0.516497</td>\n",
       "      <td>0.517037</td>\n",
       "      <td>0.581362</td>\n",
       "      <td>0.831119</td>\n",
       "      <td>0.987921</td>\n",
       "      <td>4240.660402</td>\n",
       "      <td>11.871508</td>\n",
       "      <td>465-2479</td>\n",
       "      <td>620</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1.0</th>\n",
       "      <td>0.572737</td>\n",
       "      <td>0.612512</td>\n",
       "      <td>0.581578</td>\n",
       "      <td>0.584584</td>\n",
       "      <td>0.565698</td>\n",
       "      <td>0.610521</td>\n",
       "      <td>0.830873</td>\n",
       "      <td>0.993160</td>\n",
       "      <td>3974.752122</td>\n",
       "      <td>10.536009</td>\n",
       "      <td>155-2169</td>\n",
       "      <td>620</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1.5</th>\n",
       "      <td>0.513430</td>\n",
       "      <td>0.481881</td>\n",
       "      <td>0.525467</td>\n",
       "      <td>0.466834</td>\n",
       "      <td>0.507227</td>\n",
       "      <td>0.456934</td>\n",
       "      <td>0.809130</td>\n",
       "      <td>0.986617</td>\n",
       "      <td>4047.846788</td>\n",
       "      <td>11.556355</td>\n",
       "      <td>310-2324</td>\n",
       "      <td>620</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0.5</th>\n",
       "      <td>0.613091</td>\n",
       "      <td>0.857171</td>\n",
       "      <td>0.634828</td>\n",
       "      <td>0.754389</td>\n",
       "      <td>0.607782</td>\n",
       "      <td>0.856764</td>\n",
       "      <td>0.783022</td>\n",
       "      <td>0.995595</td>\n",
       "      <td>3721.819524</td>\n",
       "      <td>9.418851</td>\n",
       "      <td>0-2014</td>\n",
       "      <td>620</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                         AVERAGE_PRECISION            \\\n",
       "                                                      mean    median   \n",
       "algorithm              window_size_group                               \n",
       "Subsequence LOF        2.0                        0.677201  0.793231   \n",
       "                       1.5                        0.678294  0.787024   \n",
       "                       1.0                        0.710013  0.853176   \n",
       "                       0.5                        0.715130  0.851845   \n",
       "Subsequence IF         1.5                        0.375868  0.195873   \n",
       "                       2.0                        0.385378  0.173336   \n",
       "                       1.0                        0.379023  0.198106   \n",
       "                       0.5                        0.301753  0.134934   \n",
       "Spectral Residual (SR) 2.0                        0.133300  0.057824   \n",
       "                       0.5                        0.137767  0.061300   \n",
       "                       1.5                        0.136132  0.054127   \n",
       "                       1.0                        0.135212  0.066699   \n",
       "DeepAnT                2.0                        0.523242  0.582397   \n",
       "                       1.0                        0.572737  0.612512   \n",
       "                       1.5                        0.513430  0.481881   \n",
       "                       0.5                        0.613091  0.857171   \n",
       "\n",
       "                                         RANGE_PR_AUC              PR_AUC  \\\n",
       "                                                 mean    median      mean   \n",
       "algorithm              window_size_group                                    \n",
       "Subsequence LOF        2.0                   0.644477  0.665071  0.676099   \n",
       "                       1.5                   0.644560  0.695121  0.677149   \n",
       "                       1.0                   0.678452  0.770666  0.708901   \n",
       "                       0.5                   0.671394  0.735250  0.714049   \n",
       "Subsequence IF         1.5                   0.406711  0.356624  0.372936   \n",
       "                       2.0                   0.434137  0.357213  0.384005   \n",
       "                       1.0                   0.419387  0.358280  0.376608   \n",
       "                       0.5                   0.336601  0.237578  0.298906   \n",
       "Spectral Residual (SR) 2.0                   0.162506  0.064206  0.136070   \n",
       "                       0.5                   0.146608  0.068046  0.136600   \n",
       "                       1.5                   0.156055  0.063705  0.134636   \n",
       "                       1.0                   0.145925  0.068548  0.134208   \n",
       "DeepAnT                2.0                   0.520148  0.516497  0.517037   \n",
       "                       1.0                   0.581578  0.584584  0.565698   \n",
       "                       1.5                   0.525467  0.466834  0.507227   \n",
       "                       0.5                   0.634828  0.754389  0.607782   \n",
       "\n",
       "                                                     ROC_AUC            \\\n",
       "                                            median      mean    median   \n",
       "algorithm              window_size_group                                 \n",
       "Subsequence LOF        2.0                0.788295  0.924573  0.995574   \n",
       "                       1.5                0.785187  0.918495  0.996107   \n",
       "                       1.0                0.852707  0.915659  0.997009   \n",
       "                       0.5                0.851434  0.909146  0.992777   \n",
       "Subsequence IF         1.5                0.191174  0.794625  0.862731   \n",
       "                       2.0                0.170053  0.782315  0.853456   \n",
       "                       1.0                0.194197  0.781650  0.864849   \n",
       "                       0.5                0.125000  0.742701  0.813636   \n",
       "Spectral Residual (SR) 2.0                0.058108  0.573339  0.542867   \n",
       "                       0.5                0.059844  0.569153  0.533754   \n",
       "                       1.5                0.053187  0.565776  0.538426   \n",
       "                       1.0                0.065900  0.540099  0.528240   \n",
       "DeepAnT                2.0                0.581362  0.831119  0.987921   \n",
       "                       1.0                0.610521  0.830873  0.993160   \n",
       "                       1.5                0.456934  0.809130  0.986617   \n",
       "                       0.5                0.856764  0.783022  0.995595   \n",
       "\n",
       "                                         train_main_time execute_main_time  \\\n",
       "                                                    mean              mean   \n",
       "algorithm              window_size_group                                     \n",
       "Subsequence LOF        2.0                           NaN         23.317364   \n",
       "                       1.5                           NaN         19.442469   \n",
       "                       1.0                           NaN         15.650241   \n",
       "                       0.5                           NaN         11.195135   \n",
       "Subsequence IF         1.5                           NaN         12.162610   \n",
       "                       2.0                           NaN         13.135336   \n",
       "                       1.0                           NaN         11.188577   \n",
       "                       0.5                           NaN         10.683038   \n",
       "Spectral Residual (SR) 2.0                           NaN          4.629574   \n",
       "                       0.5                           NaN          5.379403   \n",
       "                       1.5                           NaN          4.757040   \n",
       "                       1.0                           NaN          4.898662   \n",
       "DeepAnT                2.0                   4240.660402         11.871508   \n",
       "                       1.0                   3974.752122         10.536009   \n",
       "                       1.5                   4047.846788         11.556355   \n",
       "                       0.5                   3721.819524          9.418851   \n",
       "\n",
       "                                         experiment IDs repetition  \n",
       "                                                             count  \n",
       "algorithm              window_size_group                            \n",
       "Subsequence LOF        2.0                  20550-29864       2430  \n",
       "                       1.5                  20415-29729       2430  \n",
       "                       1.0                  20280-29594       2430  \n",
       "                       0.5                  20145-29459       2430  \n",
       "Subsequence IF         1.5                  18795-20009        405  \n",
       "                       2.0                  18930-20144        405  \n",
       "                       1.0                  18660-19874        405  \n",
       "                       0.5                  18525-19739        405  \n",
       "Spectral Residual (SR) 2.0                  14070-18524       1215  \n",
       "                       0.5                  13665-18119       1215  \n",
       "                       1.5                  13935-18389       1215  \n",
       "                       1.0                  13800-18254       1215  \n",
       "DeepAnT                2.0                     465-2479        620  \n",
       "                       1.0                     155-2169        620  \n",
       "                       1.5                     310-2324        620  \n",
       "                       0.5                       0-2014        620  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "sort_by = (\"ROC_AUC\", \"mean\")\n",
    "metric_agg_type = [\"mean\", \"median\"]\n",
    "time_agg_type = \"mean\"\n",
    "aggs = {\n",
    "    \"AVERAGE_PRECISION\": metric_agg_type,\n",
    "    \"RANGE_PR_AUC\": metric_agg_type,\n",
    "    \"PR_AUC\": metric_agg_type,\n",
    "    \"ROC_AUC\": metric_agg_type,\n",
    "    \"train_main_time\": time_agg_type,\n",
    "    \"execute_main_time\": time_agg_type,\n",
    "    \"index\": lambda index: \"\" if len(index) < 2 else f\"{index.iloc[0]}-{index.iloc[-1]}\",\n",
    "    \"repetition\": \"count\"\n",
    "}\n",
    "\n",
    "df_tmp = df2.reset_index()\n",
    "df_tmp = df_tmp.groupby(by=[\"algorithm\", \"window_size_group\"]).agg(aggs)\n",
    "df_tmp = df_tmp.rename(columns={\"index\": \"experiment IDs\", \"<lambda>\": \"\"})\n",
    "df_tmp = (df_tmp\n",
    "          .reset_index()\n",
    "          .sort_values(by=[\"algorithm\", sort_by], ascending=False)\n",
    "          .set_index([\"algorithm\", \"window_size_group\"]))\n",
    "with pd.option_context(\"display.max_rows\", None, \"display.max_columns\", None):\n",
    "    display(df_tmp)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "69560d87",
   "metadata": {},
   "source": [
    "#### Selected parameters\n",
    "\n",
    "Use the heuristic `2.0 dataset period size`. It works best for SubLOF, SR, and DeepAnT. SubIF seems to perform better with 1.5 period size, but just slightly, so 2.0 should be fine."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "56b9f4cc",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
